Selenium WebDriver automation testing |EngineerDiaries

Jan 13, 2021, 1854 Views, 4

1.What is Selenium Testing?

Selenium is an automation testing tool for browsers. What this means is that when you develop a web application and want to test components of a webpage, you write a script in Selenium and then test the output. If the output passes, then you move on to test another component under development. 

Selenium was in fact created by Jason Huggins in 2004 who was an engineer at ThoughtWorks. He found that testing the UI of web applications manually was a repeated task, so he wanted to automate this testing. So, he created a program called JavaScriptTestRunner which later became open source under Selenium Core.

Currently, Selenium testing has 3 testing tools namely:

  1. Selenium Webdriver
  2. Selenium IDE
  3. Selenium Grid

In the later section, will look at the difference between the three but this tutorial focuses primarily on Selenium Webdriver.

2.Selenium Web driver vs Selenium Remote Control

Selenium Remote Control: Original Selenium core project in 2004 later became Selenium Remote Control where the requests sent to the browser were tested on a proxy server called Selenium RC which now has become deprecated as we now have Selenium Web Driver. One can write the test cases on Selenium RC in any language. But becomes complicated and a lot slower as there is a middleware introduced.

Selenium Webdriver: Selenium Webdriver ,on the other hand, controls the browser from Operating System-level which simplifies the architecture. No need to have a proxy server running, but requires different drivers for different browsers that is chromedriver for google chrome, Mozilla driver for Mozilla Firefox browser.

Selenium WebDriver automation testing |EngineerDiaries

3.Why to use the Selenium testing tool?

Till now we have understood that Selenium automates the browser testing for web applications and to be more specific UI/UX. But, let us now closely examine what all we can do by selenium testing tool like selenium webdriver. We can generate scripts to automate processes like

  1. UI for cross-browser platforms that is how the UI looks on Mozilla vs chrome as there are differences in the browser and hence, the responsiveness
  2. Ensure performance by using Selenium wait to see if the same output is being visible on cross browsers
  3. Take Screenshots of the UX of the same code on cross browsers
  4. Validate the effect of prompts across cross browsers.
  5. Check performance for page loads

4.Selenium Webdriver vs Selenium IDE vs Selenium Grid

Now, before we begin with the tutorial and enhance our understanding of Selenium Webdriver. Let’s first know the difference between the three: Selenium Webdriver vs Selenium IDE vs Selenium Grid.

Selenium Webdriver:

Selenium Webdriver is an automation testing tool for web applications used that supports multiple environments and hence programming languages. Also, supports many drivers for respective browsers. The entire architecture of it is followed in the following article.

Languages Supported: Java, Python, C#, Ruby, Javascript, Kotlin

Browsers Supported: Chrome, Firefox, Edge, Internet Explorer, Opera, Safari

Selenium IDE:

This is the simplest way to use Selenium is through its IDE where you get extensions for chrome and Firefox and directly generate scripts. SO, no need for a separate webdriver, but of course the limitation lies in the fact that it is just limited to these two browsers only.

Selenium Grid:

Now, with Selenium Webdriver you have automated testing across multiple browsers using respective drivers, but what happens in the case of multiple operating systems. When high-end products are built, even say Google chrome, the quality is of the utmost essence and these details are the key. So, to run scripts on multiple machines is what Selenium Grid is used for.

Selenium WebDriver automation testing |EngineerDiaries

5.Selenium WebDriver Introduction

Selenium Web driver has simplified the cross-browser web application testing significantly without the use of any servers and at the operating system level itself. What happens is that the same platform you are writing your application, say Java application in eclipse or dot net application in the visual studio now supports Selenium libraries. These libraries help you generate the automated scripts for testing web applications through screenshots, waits, etc features provided in these libraries. Now, you download separate webdrivers and access them through the selenium libraries and perform your test suites as what the output is being visible, and if the test case is passed or not.

Selenium webdrivers hence allows to test across multiple browsers and most importantly easy to add in the existing code you are working in so if the test cases are passed the code can be merged into the production. Below, diagram would make it even more clear.

Selenium WebDriver automation testing |EngineerDiaries

6.Why should you learn selenium webdriver?

This is the most important question is why and who should invest time in learning Selenium Webdriver:

  1. If you are planning to migrate to the IT industry. Learning Selenium Webdriver becomes the most crucial step.
  2.  For female candidates, who want to enter the IT industry there are special preference given to them for testing jobs
  3. If coding scares you and development is something you dont want to face then testing jobs are easier.
  4.  Most importantly in a country like India we a have huge demand for testing jobs and they would never vanish plus at product-based companies they are paid extensively well.

Comments Section:


Jun 8, 2021



Jun 8, 2021

new comment


Jun 8, 2021



May 17, 2021

Very good post