This repository provides a comprehensive Selenium framework for web application testing using the Page Object Model (POM) design pattern.
-
Prerequisites: Ensure a web browser and corresponding webdriver are installed. For Firefox on Windows, download the Gecko driver from here. Install necessary Selenium packages with
pip install -r requirements.txt
. -
Driver Manager: Initializes and manages Selenium web drivers in local and remote modes. Configurable for browsers like Firefox and Chrome using a central config file.
-
Pages: Base page is the Foundation for all page objects. Includes common web interactions like finding elements and navigating URLs. An example of a login page is there.
-
Locators: Centralizes all locators, grouped by page for easy management and updates.
-
Selenium Tests: Contains scripts to validate login functionality, including navigation, credential input, and post-login URL verification.
- GitHub Workflows: Set up under
tests/selenium/test_selenium_pom.py
:- Single Browser Test Workflow: For testing on a single browser (Firefox or Chrome).
- Multi-Browser Test Workflow: Simultaneous testing on Firefox and Chrome.
- Multi-Browser and Multi-Type Test Workflow: Testing on multiple browsers, both manually and via a cron job.
This setup provides a robust framework for Selenium testing, utilizing POM for efficient and effective test case management.