Steps to run autotests with selenium and python
-
Download a "saucedemo autotest.py" from "Exercise 1B - Selenium" folder
-
Download the latest Chromedriver according to your version of a browser (https://googlechromelabs.github.io/chrome-for-testing/) and unpack it
-
Download and install python (https://www.python.org/downloads/)
-
Install any IDE you like (example based on https://www.jetbrains.com/pycharm/)
-
Install Selenium webdriver
5.1 Open your console/terminal app
5.2 Write and run "pip install -U selenium"
5.3 Wait until install
-
Open your IDE
-
Create a project
-
Open project
-
Open settings
-
Select your project and go to Python Interpreter
-
With + button search for Selenium add it and close the tab
-
In IDE go to File - Open - saucedemo autotest.py
-
Change the path in (os.environ['PATH'] += r"/usr/local/bin") to the directory where your chromedriver is (lines 10, 23, 47, 72)
-
Click on the play button to run a test
-
In the lower part of the screen in the tab "Run" observe test run results