This Project design to pratice in creation of WebDriver tests using Python programming language
- Install Python of version "3.11" or higher from Python.org. Don't forget to include it to PATH variables
- Install pipenv, run
pip install pipenvfrom the command line.
- In the root of the repository, run "pipenv install" from the command line.
- Run "pipenv shell" from command line to activate virtual environment
- For Web UI testing, you will need to install the latest versions of the browsers e.g. Google Chrome or/and Mozilla Firefox.
- You will also need to install the latest versions of the WebDriver executables for these browsers: ChromeDriver for the browsers e.g Chrome and geckodriver for Firefox.
Note: Please be careful, some of the browser versions and WebDriver executables may be not compatible. So, it's recommended to use latest versions of both if you don't need some specific version
- Create a folder named
C:\Selenium. Note: It can be any name name - Move the executables into this folder.
- Add this folder to the Path environment variable. (See How to Add to Windows PATH Environment Variable.)
- WebDriver manager automatically resolves WebDriver with "pipenv install" command
- I was using Visual Studio Code Visual Studio Code
- Alternatively you could also use PyCharm
-
Run command
pipenv run python -m pytestfrom the command line -
Run command
pipenv run python -m pytest -n 5from command line in order to run tests in parallel. Number "5" can be changed to expected number of threads -
Run command
pipenv run python -m pytest -sfrom command line to run all the tests and see all printed outputs -
Run command
pipenv run python -m pytest -m 'smoke'from command line when you want to add test category
- Edit "config.json" file in order to update test config
- At this moment you can change
- browser (Supported values are: "Firefox", "Chrome", "Headless Chrome")
- implicit_wait (Just integer value for implicit timeout)
- explicit_wait (Just integer value for explicit timeout)

