Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

📔 Page object design pattern implementation (python, pom, selenium, pytest, travisCI)

License

NotificationsYou must be signed in to change notification settings

utestpy/python-page-object

Repository files navigation

Screenshot

made-with-pythonBuild StatusCoverage StatusCode style: blackChecked with flake8Checked with mypyLicense: GPL v3CodeFactorDocsEO principles respected here

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 onhttp://demo.guru99.com/test/newtours web application.

Tools

Production

Development

  • mypy static type checker tool
  • black code formatter tool
  • flake8 code style tool

In addition, a source code isfullytype annotated

Usage

Usage

Quick start

From the root directory of your shell run following command:

./run-tests.shhelpTool allows to simplify run of automated testsfor POM sample project.Available actions: - smoke                 run automated smoke tests - unittest              run automated unittest tests - all                   run all automated tests -help                  displayhelpNote:help will be providedincase 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 opentest-report.html file to see detailed testing report e.g:

Screenshot

Generate allure report

Please follow next instruction to generate allure report (mac OS example):

  1. Update java viabrew cask install adoptopenjdk
  2. Install allure viabrew install allure
  3. Generate allure project viaallure serve report

Screenshot

Development notes

Selenium grid setup

  1. Install selenium grid fromhttps://www.selenium.dev/downloads
  2. Run in standalone mode
java -jar selenium-server-4.0.0-alpha-7.jar standalone --port 9515pytest
  1. Run in hub & node mode
java -jar selenium-server-4.0.0-alpha-7.jar hub --port 9515java -jar selenium-server-4.0.0-alpha-7.jar node --port 5555pytest

Release History

Please checkchangelog file to get more details about actual versions and it's release notes.

Meta

Author –Volodymyr Yahello.

Distributed under theGPL v3 license. Seelicense for more information.

You can reach out me at:

Contributing

I would highly appreciate any contribution and support. If you are interested to add your ideas into project please follow next simple steps:

  1. Clone the repository
  2. Configuregit for the first time after cloning with yourname andemail
  3. pip install -r requirements.txt to install all project dependencies
  4. pip install -r requirements-dev.txt to install all development project dependencies
  5. Create your feature branch (git checkout -b feature/fooBar)
  6. Commit your changes (git commit -am 'Add some fooBar')
  7. Push to the branch (git push origin feature/fooBar)
  8. Create a new Pull Request

About

📔 Page object design pattern implementation (python, pom, selenium, pytest, travisCI)

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors2

  •  
  •  

[8]ページ先頭

©2009-2025 Movatter.jp