Selenium Webdriver for Automating Web Application Testing (Part 1)

Khong Lee
Oct 22, 2020

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

  1. Download Python bindings for Selenium
    - run “pip install selenium” or “pip3 install selenium” in terminal depending on your python version
  2. 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
  3. Testing
    - write the following python script to test if installation works
    - execute the python script

Installation on Windows

  1. Download Python bindings for Selenium
    - run “pip install selenium” or “pip3 install selenium” in terminal depending on your python version
  2. 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/
  3. 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.

--

--