✨ Web Automation Testing using Selenium WebDriver, Python, & POM design pattern ✨
What will be used on this project
| Item | Source |
|---|---|
| Editor | VS Code (https://code.visualstudio.com/download) |
| Package Manager | PIP (https://pip.pypa.io/en/stable/getting-started/) |
| UI Test Tools | Selenium WebDriver with Python (https://pypi.org/project/selenium/) |
| WebDriver Manager (https://pypi.org/project/webdriver-manager/) | |
| Design Pattern | Selenium POM or Page Object Model |
| Test Reporter | Pytest HTML (https://pytest-html.readthedocs.io/en/latest/) |
| Browser | Latest version of Chrome / Mozilla Firefox |
Install VS Code Editor, Python, and PIP
To check whether you already installed Python & PIP
python --versionpython -m pip --version Install Selenium
python -m pip install SeleniumInstall Web Driver Manager
python -m pip install webdriver-manager👉 Clone this Repository through Terminal or Command Prompt
Open this Automation Project using VS Code Editor.
Change to Project directory on Terminal or Command Prompt
cd SeleniumPOMRun Specific Test Execution on Terminal
python -m unittest TestCases/test_login.pyRun All Test Execution on Terminal
python -m unittestNote: By default the Tests run on Chrome Browser
To run on Firefox Browser, change the browser on TestCases/test_login.py and TestCases/test_product.py file
# self.browser = webdriver.Chrome(service=ChromeService(ChromeDriverManager().install()))
self.browser = webdriver.Firefox(service=FirefoxService(GeckoDriverManager().install()))Install Pytest-HTML Reporter
python -m pip install pytest-htmlRun Selenium with the HTML Reporter
Note: Please wait until all test execution finished
python -m pytest --html=report.htmlTest Execution HTML Report available on SeleniumPOM/report.html