A robust UI test automation framework using Selenium WebDriver, Python, and Pytest, following best practices like Page Object Model (POM), reusable fixtures, and modular structure.
Perfect for scalable, maintainable, and parallel UI test execution for web applications.
- ✅ Page Object Model (POM) structure
- ✅ Selenium WebDriver for browser automation
- ✅ Pytest for test execution and reporting
- ✅ Allure Reports integration
- ✅ Parallel execution support (
pytest-xdist
) - ✅ Configurable test environments (local/grid)
- ✅ Email reporting support (optional)
- ✅ Easy to scale and customize
UI_Selenium_Pytest_Automation/
├── configs/ # Environment and base configs
├── pages/ # Page object models
├── reports/ # Allure or HTML reports
├── tests/ # Test cases
├── utils/ # Utility functions and wrappers
├── conftest.py # Pytest fixtures and hooks
├── requirements.txt # Project dependencies
└── README.md # Project documentation
- Python 3.8 or higher
- Google Chrome or any supported browser
- pip (Python package manager)
git clone https://github.com/sbaqa/UI_Selenium_Pytest_Automation.git
cd UI_Selenium_Pytest_Automation
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
brew install allure
pytest tests/test_login.py
pytest -n 4
pytest --alluredir=reports/allure-results
allure serve reports/allure-results