Selenium Introduction

Hello friends! this is our first tutorial of the Selenium tutorial series. In this tutorial, we will study the basics of the Selenium suite, its different components, features, advantages, and limitations.

What is Selenium?

Selenium is a free and open-source test automation suite used for automating web-based applications. It supports automation across different browsers, platforms, and programming languages.

Using Selenium, we can automate the functional tests and easily integrate them with Maven, Jenkins, and other build automation and continuous integration tools.

Components of Selenium Suite

Selenium Suite comprises of the following four components-

  1. Selenium IDE – Selenium IDE is a record and playback automation tool using which we can automate the web applications. It comes in the form of a Chrome and Firefox browser extension.
    Since it works on the record and playback principle, so it is the first choice automation tool for people with no or limited programming language experience.

  2. Selenium RC – Selenium Remote Control(RC) is officially deprecated by Selenium. It used to inject the javascript code in the browser for automation and required an additional server for running the automation scripts.
    Apart from this, it had many limitations like – it was slow, it didn’t had a headless browser like HtmlUnitDriver and before executing the test scripts the server was required to be started.

  3. Selenium WebDriver – By far the most important component of Selenium Suite. It provides different drivers for different browsers and supports multiple programming languages.
    It is purely object-oriented and supports all the major browsers – Chrome, Firefox, IE, Safari, etc and scripting can be done in most of the popular languages – Java, Python, Ruby, etc.

  4. Selenium Grid – Selenium Grid is also an important part of the Selenium Suite. It helps in the distributed running of Selenium tests in parallel across multiple remote machines.
    It has a hub and multiple nodes. The nodes run the Selenium instances on which the test cases are executed. These nodes are connected to a central hub which acts as a server and controls the whole test execution.

Advantages of Selenium

Let’s now see some of the advantages of Selenium-

  1. Selenium is open source, there is no licensing cost for its usage.
  2. Scripting can be done in most of the widely used programming languages like Java, C#, Ruby, and Python.
  3. It supports most of the popular browsers like Chrome, Firefox, Internet Explorer, Opera, and Safari.
  4. Selenium IDE component of the Selenium suite provides record and playback features using which non-programmers can also write automation scripts.
  5. Selenium Grid helps in parallel and distributed testing.

Limitations of Selenium

Some of the limitations of Selenium are-

  1. Selenium does not provide desktop application automation support.

  2. Web Services – REST or SOAP cannot be automated using Selenium.

  3. Selenium WebDriver requires programming language requirements for script creation.

  4. For performing common tasks required in automation like logging, reading-writing to external files, we have to rely on external libraries.

Let’s check the Selenium WebDriver component in a little more detail now.

What is Selenium WebDriver?

Selenium Webdriver is one of the most widely used tools for automating web applications. It automates the browsers by calling their native method directly unlike Selenium RC which injects javascript in browsers for automation. Hence, Webdriver is much faster than Selenium RC.

Apart from this, Selenium WebDriver can also handle scenarios like alerts, pop-ups, ajax requests, keyboard, and mouse actions easily.

Since Webdriver directly calls the methods of different browsers hence we have a separate driver for each browser.

Conclusion

This completes our tutorial on Introduction to Selenium and it’s most important component Selenium WebDriver. In the next tutorial of this Selenium Tutorial series, we will be studying the installation of the Selenium WebDriver component.

Leave a Comment