Web automation testing demo using Selenium webdriver and Python
Test Environments:
- Windows 10 Home
- Google Chrome (64 bit) Version 84.0
- Python 3.7.6
- Selenium 3.141.0
Setup:
- Install Python from https://www.python.org/downloads/. Select option to add Python to PATH during the installation.
- Clone or download code from this repository
- Create virtual Environments in the location where the code reside locally
pip install virtualenv
pip install virtualenvwrapper-win
mkvirtualenv amazon
pip install selenium
pip install html-testRunner
- Download Chrome web driver (chromedriver_win32.zip) from https://sites.google.com/a/chromium.org/chromedriver/ and ensure chromedriver.exe location is added to the PATH environment variable in the virtual environment.
Run Test on windows:
- Launch command line prompt
- Switch to amazon virtual environment:
workon amazon
- Run test cases:
python tests\TestCases.py
Reference:
- https://docs.python.org/3/library/unittest.html
- https://medium.com/@asheeshmisra29/web-automation-selenium-webdriver-and-python-getting-started-part-1-157be93049d7