https://github.com/reddomgt/pythonseleniumtestframework
This repository contains a modular and scalable Selenium-based test automation framework built with Python. It is designed to simplify web application testing by following best practices, including the Page Object Design Pattern and data-driven testing. The framework supports multiple browsers, dynamic browser selection at runtime...
https://github.com/reddomgt/pythonseleniumtestframework
browser-automation cross-browser-testing page-object-model pytest python selenium selenium-python test-automation testing webdriver
Last synced: 28 days ago
JSON representation
This repository contains a modular and scalable Selenium-based test automation framework built with Python. It is designed to simplify web application testing by following best practices, including the Page Object Design Pattern and data-driven testing. The framework supports multiple browsers, dynamic browser selection at runtime...
- Host: GitHub
- URL: https://github.com/reddomgt/pythonseleniumtestframework
- Owner: Reddomgt
- Created: 2025-04-24T16:55:08.000Z (about 1 month ago)
- Default Branch: main
- Last Pushed: 2025-04-30T04:52:06.000Z (28 days ago)
- Last Synced: 2025-04-30T04:57:13.413Z (28 days ago)
- Topics: browser-automation, cross-browser-testing, page-object-model, pytest, python, selenium, selenium-python, test-automation, testing, webdriver
- Language: HTML
- Size: 32 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Python Selenium Test Framework π
    
Welcome to the **Python Selenium Test Framework**! This repository contains a modular and scalable Selenium-based test automation framework built with Python. It is designed to simplify web application testing by following best practices, including the Page Object Design Pattern and data-driven testing. The framework supports multiple browsers and allows for dynamic browser selection at runtime.
## Table of Contents
1. [Features](#features)
2. [Installation](#installation)
3. [Usage](#usage)
4. [Framework Structure](#framework-structure)
5. [Contributing](#contributing)
6. [License](#license)
7. [Links](#links)## Features π
- **Modular Design**: Organize tests in a way that promotes reuse and maintainability.
- **Page Object Model**: Simplify the code and improve readability by separating page logic from test logic.
- **Cross-Browser Testing**: Run tests across multiple browsers seamlessly.
- **Dynamic Browser Selection**: Choose the browser at runtime for flexible testing.
- **Data-Driven Testing**: Easily run the same tests with different sets of data.
- **Easy Integration**: Works well with CI/CD tools to automate your testing pipeline.## Installation π οΈ
To get started with the Python Selenium Test Framework, follow these steps:
1. **Clone the Repository**:
```bash
git clone https://github.com/Reddomgt/PythonSeleniumTestFrameWork.git
cd PythonSeleniumTestFrameWork
```2. **Install Dependencies**:
Use pip to install the required packages:
```bash
pip install -r requirements.txt
```3. **Setup WebDriver**:
Make sure to download the appropriate WebDriver for your browser. Place it in your system's PATH or specify its location in the configuration file.
## Usage π
To run your tests, you can use the `pytest` command:
```bash
pytest tests/
```### Example Test
Here is a simple example of a test case using the framework:
```python
from pages.login_page import LoginPagedef test_login_valid_credentials(driver):
login_page = LoginPage(driver)
login_page.open()
login_page.login("username", "password")
assert login_page.is_login_successful()
```### Dynamic Browser Selection
You can specify the browser type when running the tests:
```bash
pytest --browser chrome
```This allows you to easily switch between browsers without changing your test code.
## Framework Structure π
The framework follows a structured approach to keep everything organized. Hereβs a breakdown of the main directories:
```
PythonSeleniumTestFrameWork/
β
βββ tests/ # Test cases
β βββ test_login.py
β βββ test_signup.py
β
βββ pages/ # Page Object Models
β βββ login_page.py
β βββ signup_page.py
β
βββ drivers/ # WebDriver binaries
β βββ chromedriver
β βββ geckodriver
β
βββ utils/ # Utility functions
β βββ config.py
β βββ logger.py
β
βββ requirements.txt # Required packages
```## Contributing π€
We welcome contributions to the Python Selenium Test Framework! If you would like to contribute, please follow these steps:
1. Fork the repository.
2. Create a new branch (`git checkout -b feature-branch`).
3. Make your changes and commit them (`git commit -m 'Add new feature'`).
4. Push to the branch (`git push origin feature-branch`).
5. Create a pull request.Please ensure your code follows the existing style and includes tests where applicable.
## License π
This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.
## Links π
For more information and to download the latest releases, visit our [Releases page](https://github.com/Reddomgt/PythonSeleniumTestFrameWork/releases).
Explore the framework and contribute to its growth. If you have any questions, feel free to check the "Releases" section for updates and improvements.
Happy testing! π§ͺ