2. Setup pytest
pytest is a modern and powerful Test Framework and we want to get intellisense and autocomplete
1. Install pyleniumio
Install Pylenium into your Virtual Environment if you haven't already:
poetry
and pipenv
auto-generate virtual environments for you!
2. Initialize Pylenium
Execute this command at your Project Root
This creates three files:
conftest.py
- This has the fixtures needed for Pyleniumpylenium.json
- This is the configuration file for Pyleniumpytest.ini
- This is the configuration file for pytest
By default, Pylenium uses the Chrome browser. Chrome must be installed on the machine, but you don't have to worry about installing any of the drivers.
3. Select pytest as the Test Framework
To get the most out of your IDE, you need to configure it to use pytest as the Test Framework. This will give you:
Intellisense
Autocomplete
Run/Debug Test functionality with breakpoints
more depending on IDE
Visit the pytest docs for more info on how to use it: https://docs.pytest.org/
Last updated