This repository contains automated tests for multiple websites using Playwright and pytest:
- Nuqayah (https://nuqayah.com)
- Turath (https://app.turath.io)
- Create a virtual environment (recommended):
python -m venv venv
source venv/bin/activate # On Linux/Mac
# or
.\venv\Scripts\activate # On Windows- Install dependencies:
# Install main dependencies
pip install .
# Install development dependencies (optional)
pip install ".[dev]"- Install Playwright browsers:
playwright installTo run tests for a specific website:
# For Nuqayah
pytest --website=nuqayah
# For Turath
pytest --website=turathAdditional options:
- Run with HTML report:
pytest --website=nuqayah --html=report.html- Run in headed mode (to see the browser):
pytest --website=nuqayah --headed- Run a specific test:
pytest --website=nuqayah test_nuqayah.py::test_homepage_titleconftest.py: Contains shared fixtures and configuration for all websites- Website selection via
--websiteparameter - Browser and page management
- Automatic base URL navigation
- Website selection via
test_nuqayah.py: Test cases for Nuqayah websitetest_turath.py: Test cases for Turath websitepyproject.toml: Project configuration and dependencies
- Homepage title verification
- Navigation links
- Project section content
- Social media links
- Contact section
- [TODO: Add specific test coverage for Turath]
To run all code quality checks:
- Tests are written in Arabic to match the website's content
- The browser is configured to use Arabic locale
- Each test automatically returns to the base URL after completion