A Selenium automation framework built with Python, PyTest, and the Page Object Model (POM) design pattern. Tests are written against the OrangeHRM demo application.
python-selenium-pytest-framework/ ├── config/ │ └── config.py ├── pages/ │ ├── LoginPage.py │ ├── LogoutPage.py │ ├── PIMPage.py │ └── SearchEmployee.py ├── tests/ │ ├── conftest.py │ ├── test_login.py │ ├── test_logout.py │ ├── test_PIM.py │ └── test_searchEmployee.py ├── .gitignore ├── pytest.ini └── README.md
- Python 3.x
- Selenium WebDriver
- PyTest
- WebDriver Manager
- Page Object Model (POM)
- Clone the repository
git clone https://github.com/sanjayvelan24/python-selenium-pytest-framework.git
cd python-selenium-pytest-framework- Create and activate virtual environment
python -m venv venv
venv\Scripts\activate- Install dependencies
pip install -r requirements.txtRun all tests:
pytest -vRun a specific test file:
pytest tests/test_login.py -vAll configuration is managed in config/config.py:
BASE_URL— application URLBROWSER— browser to useIMPLICIT_WAIT— global wait time in seconds