An Introduction to Selenium – A set of Tools

Why Test Automation is required:

Software Development Life Cycle (SDLC) is a process of planning, creating, testing, and deploying a software. We have many SDLC models available. For example:- Waterfall model, Iterative model, V&V model etc. Please note these are traditional SDLC models which are time consuming, less dynamic and cost ineffective. So, maximum software companies are adopting latest SDLC model called Agile methodology . Agile methodology advocates adaptive planning, evolutionary development, early delivery, and continuous improvement, and it encourages rapid and flexible response to change. You can read more about Agile here.

In short, we get many continuous builds frequently with new features and bug fixes and every time we need to re-run old test cases manually (Which is called as Regression and Sanity testing) to check whether old functionalities are working or not. It is time consuming and of course may delay launch of software.

Re-running of all test cases repeatedly manually is not feasible now.  Test automation comes in to picture here. We can automate those regression suites and can run whenever we get a new build. It will save time, money, and resources. Here I am not just talking about front end automation. It can be backend i.e. APIs automation. In fact in now a days, APIs automation is more in demand than front end automation.

There was a time when automation was preferred only when software is well stable and just to reduce regression effort required for health checking of application. Not all test cases or scenarios used to be automated. But now things have been changed and automation can be started from the very first day of application building process. In Agile, many organization prefer automation in same sprint or N-1 sprint.

Types of applications:

  1. Desktop based applications
  2. Web based applications

Definition of desktop based applications:

A desktop application is a computer program that runs locally on a computer device, such as desktop or laptop. Desktop applications have traditionally been limited by the hardware on which they are run. They must be developed and installed on a particular operating system, and may have strict hardware requirements that must be met to ensure that they function correctly.

Definition of Web based application:

Applications which are accessed using browsers (For example: Chrome, Firefox etc.) are called as Web based applications. Some famous web based applications are Flipkart, Facebook, Gmail etc. To access these applications, we need a browser. To automate the front end of a web based application, we can use a test automation tool called SELENIUM. There are many other automation tools are available in market like Protractor, TestComplete, UFT etc. In this post, we will be focusing on Selenium tool.

Any application will have three layers commonly. Front End, Middleware and Back End. Selenium helps in automating Front End only. I see many people asks that if we can automate API or Database using Selenium. Answer is No. Selenium can automate only Front End or User Interface (UI) or we can say the part of application which requires a browser.

Selenium:

  • Selenium was created by Jason Huggins in 2004 who is an engineer at ThoughtWorks.
  • Selenium automates browsers. These three words define selenium well.
  • Selenium official website says:- Primarily, it is for automating web applications for testing purposes, but is certainly not limited to just that. Boring web-based administration tasks can (and should!) be automated as well.
  • Selenium has the support of some of the largest browser vendors who have taken (or are taking) steps to make Selenium a native part of their browser. It is also the core technology in countless other browser automation tools, APIs and frameworks.
  • Selenium is a set of different software tools each with a different approach to supporting test automation.
  • Selenium is a free or open source automation testing suite which is used to automate web based applications across different browsers (Chrome, Firefox, IE, Opera , Safari etc.) and platforms (Windows, Linux, Mac etc.).
  • Selenium source code is available publicly for use or modification by community and there is no fee of using this software.

Selenium is a suite because it is not single tool. It has major 4 tools, so we are referring it as a suite. It consists of:

  1. Selenium Integrated Development Environment (IDE)
  2. Selenium Remote Control (RC)
  3. Selenium Webdriver
  4. Selenium Grid

Selenium 1 is referred as Selenium RC. In 2008, selenium RC and selenium Webdriver are merged which was named as Selenium 2. Selenium WebDriver and Selenium Grid are mostly used tools as of now. Selenium IDE is a record and play test automation tool which is almost dead. But recently new version of Selenium IDE has been launched. In this post, we will be focusing more on Selenium WebDriver. Selenium 4 is also launched.

Selenium WebDriver:

  • Selenium WebDriver is the successor of Selenium Remote Control which has been officially deprecated.
  • WebDriver API was integrated with Selenium 2.0 as a new feature. WebDriver API was developed to address limitation of Selenium – RC.
  • Unlike Selenium – RC, Selenium-WebDriver makes direct calls to the browser using each browser’s native support for automation. This is the reason we have driver class for each browser. E.g ChromeDriver, EdgeDriver etc.
  • Selenium has the support of some of the largest browser vendors who have taken (or are taking) steps to make Selenium a native part of their browser. It is also the core technology in countless other browser automation tools, APIs and frameworks.
  • If you want to create robust, browser-based regression automation suites and tests , scale and distribute scripts across many environments, we should use Selenium WebDriver.
Programming Languages supported by Selenium WebDriver:
  1. Java
  2. C#
  3. PHP
  4. Perl
  5. Ruby
  6. Python
  7. JavaScript
  8. Objective-C
  9. R
Browsers supported by Selenium WebDriver:
  1. Firefox
  2. Chrome
  3. IE
  4. Edge
  5. Safari
  6. Opera
  7. Safari
Platforms supported by Selenium WebDriver:
  1. Microsoft Windows
  2. Apple OS X
  3. Linux

You can refer here for details information about supported platform by Selenium.

If you have any doubt, feel free to comment below.
If you like my posts, please like, comment, share and subscribe.
#ThanksForReading
#HappySelenium

You can find all Selenium related post here.
You can find all API manual and automation related posts here.
You can find frequently asked Java Programs here.

Author: Amod Mahajan

8 thoughts on “An Introduction to Selenium – A set of Tools

Leave a Reply to Swati Singh Cancel reply

Please wait...

Subscribe to new posts to become automation expert

Want to be notified when my new post is published? Get my posts in your inbox.
%d bloggers like this: