Selenium Webdriver is an open source tool to automate web application. It can be coded in multiple languages — Python, Java, Javascript, C#, Ruby and etc.
In this tutorial, we will use Python as the programming language.
Part 1: Selenium Installation
Part 2: Writing Testcases
Pre-requisite: Ensure either pip or pip3 is installed
Installation on MacOs
- Download Python bindings for Selenium
- run “pip install selenium” or “pip3 install selenium” in terminal depending on your python version - Install driver (for firefox)
Selenium requires a driver to interface with the chosen browser. For example, Firefox requires geckodriver to be installed.
- run “brew install geckodriver” in terminal - Testing
- write the following python script to test if installation works
- execute the python script
Installation on Windows
- Download Python bindings for Selenium
- run “pip install selenium” or “pip3 install selenium” in terminal depending on your python version - Download driver and locate to your preferred location (eg: C:\Program File (x86))
- Chrome:
https://sites.google.com/a/chromium.org/chromedriver/downloads
- Firefox:
https://github.com/mozilla/geckodriver/releases
- Safari:
https://webkit.org/blog/6900/webdriver-support-in-safari-10/
- Edge:
https://developer.microsoft.com/en-us/microsoft-edge/tools/webdriver/ - Testing
- write the following python script to test if installation works
- execute the python script
Tadaaaa! I believe by now you have got Solenium installation done.