Web UI Test sample of chromium and pytest
- macOS: 10.0.0 above
- pip: 20.0.2
- Virtual ENV: pipenv, version 2018.11.26
- Language: python 3.7.5
- Chrome: Version 80.0.3987.132 (Official Build) (64-bit)
- Firefox: 73.0.1 (64 bit)
- Install python on your machine, pip will be installed with this python installation;
- Install pipenv;
- Copy file
chromedriver
andgeckodriver
to/usr/local/bin
;
- Enter the pipenv:
$ pipenv shell
- Install the requirements libraries:
$ pipenv install
- Run test:
// test special function with report
$ pytest --capture=no --verbose --html=./reports/pytest_selenium_test_report.html test_selenium_webdriver.py::TestURL::test_open_url
// test a file with report
$ pytest --capture=no --verbose --html=./reports/pytest_selenium_test_report.html test_selenium_webdriver.py
// test all items of the project
$ pytest
web_ui_test_sample
is avaliable under the MIT license. See the LICENSE file for more info.