python-page-object
python-page-object copied to clipboard
📔 Page object design pattern implementation (python, pom, selenium, pytest, travisCI)
![]()
Python page object model (PyPOM)
Represent most popular OOD pattern for Web UI automation using python programming language (for learning reference only).
Automated tests are demonstrated on http://demo.guru99.com/test/newtours web application.
Tools
Production
- python 3.6, 3.7, 3.8, 3.9
- pytest framework
- selenium library
- pom framework
- allure reporting
- travis CI
Development
In addition, a source code is fully type annotated ⭐
Usage

Quick start
From the root directory of your shell run following command:
./run-tests.sh help
Tool allows to simplify run of automated tests for POM sample project.
Available actions:
- smoke run automated smoke tests
- unittest run automated unittest tests
- all run all automated tests
- help display help
Note: help will be provided in case of no input parameters
Tests (html) report sample
Run a bunch of tests (e.g smoke) via following command:
./run-tests.sh smoke
Then please open test-report.html file to see detailed testing report e.g:

Generate allure report
Please follow next instruction to generate allure report (mac OS example):
- Update java via
brew cask install adoptopenjdk - Install allure via
brew install allure - Generate allure project via
allure serve report

Development notes
Selenium grid setup
- Install selenium grid from https://www.selenium.dev/downloads
- Run in standalone mode
java -jar selenium-server-4.0.0-alpha-7.jar standalone --port 9515
pytest
- Run in hub & node mode
java -jar selenium-server-4.0.0-alpha-7.jar hub --port 9515
java -jar selenium-server-4.0.0-alpha-7.jar node --port 5555
pytest
Release History
Please check changelog file to get more details about actual versions and it's release notes.
Meta
Author – Volodymyr Yahello.
Distributed under the GPL v3 license. See license for more information.
You can reach out me at:
- [email protected]
- https://github.com/vyahello
- https://www.linkedin.com/in/volodymyr-yahello-821746127
Contributing
I would highly appreciate any contribution and support. If you are interested to add your ideas into project please follow next simple steps:
- Clone the repository
- Configure
gitfor the first time after cloning with yournameandemail pip install -r requirements.txtto install all project dependenciespip install -r requirements-dev.txtto install all development project dependencies- Create your feature branch (
git checkout -b feature/fooBar) - Commit your changes (
git commit -am 'Add some fooBar') - Push to the branch (
git push origin feature/fooBar) - Create a new Pull Request