What Is Selenium

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 6

What is Selenium

Selenium is one of the most widely used open source and a portable automated software
testing Web UI (User Interface) testing tool for testing web applications. It was originally
developed by Jason Huggins in 2004 as an internal tool at Thought Works. Selenium supports
automation across different browsers, platforms and programming languages.
It has capabilities to operate across different browsers and operating systems. Selenium is not
just a single tool but a set of tools that helps testers to automate web-based applications more
efficiently.

Components of Selenium
Selenium is not just a single tool but a suite of software, each with a different approach to
support automation testing. It comprises of four major components which include:

1. Selenium Integrated Development Environment (IDE)


2. Selenium Remote Control (Now Deprecated)
3. Web Driver
4. Selenium Grid

1.Selenium Integrated Development Environment (IDE)


Selenium IDE is implemented as Firefox extension which provides record and playback
functionality on test scripts. It allows testers to export recorded scripts in many languages like
HTML, Java, Ruby, RSpec, Python, C#, JUnit and TestNG. You can use these exported
script in Selenium RC or Webdriver.

2. Selenium Remote Control

Selenium RC allows testers to write automated web application UI test in any of the
supported programming languages. It also involves an HTTP proxy server which enables the
browser to believe that the web application being tested comes from the domain provided by
proxy server.

Selenium RC comes with two components.

1. Selenium RC Server (acts as a HTTP proxy for web requests).

>

2. Selenium RC Client (library containing your programming language code).

The figure given below shows the architectural representation of Selenium RC.

3. Selenium WebDriver
Selenium WebDriver (Selenium 2) is the successor to Selenium RC and is by far the most
important component of Selenium Suite. SeleniumWebDriver provides a programming
interface to create and execute test cases. Test scripts are written in order to identify web
elements on web pages and then desired actions are performed on those elements.

Since, WebDriver directly calls the methods of different browsers hence we have separate
driver for each browser. Some of the most widely used web drivers include:

 Mozilla Firefox Driver (Gecko Driver)


 Google Chrome Driver
 Internet Explorer Driver
 Opera Driver
 Safari Driver
 HTML Unit Driver (a special headless driver)

4. Selenium Grid

Selenium Grid is also an important component of Selenium Suite which allows us to run our
tests on different machines against different browsers in parallel. In simple words, we can run
our tests simultaneously on different machines running different browsers and operating
systems.

Selenium Features

Let’s discuss the features of Selenium one by one.

1. Multi-Browser Support

Selenium is capable of interacting with web apps and the web elements in a browser just like
a real user would. Selenium does that by using a browser native support that makes direct
calls without the use of any intermediary device or software. Almost all browsers are
supported by Selenium – Chrome, Safari, IE, Opera, Edge, and Firefox. 

2. Multi-Language Compatibility
Selenium supports almost all programming languages like PHP, Java, Python, JavaScript,
Perl, Ruby, etc. You can write automation test scripts using any programming language you
feel comfortable with. You can also use switch statements, conditional statements, or
decision-making statements to enhance your automation test script. This step will make your
test script capable of handling all kinds of situations.

3. Easy Identification and Use of Web Elements

Selenium makes it easy to identify web elements on the web apps with the help of its several
locators. This makes the implementation of the elements much easier in the test automation
suite. There are various Selenium IDE you can add to your web via extensions.

4. Performance and Speed

Selenium has a particular component for the automation of web app testing called
WebDriver. This tool is able to execute test cases quicker than the other tools. It is capable of
communicating directly with the browser so there is no requirement for intermediaries like
the server.

5. Dynamic Web Elements

Selenium is capable of handling dynamic web elements with ease. It utilizes some of the
following methods to do that:

 Contains(): You can use a partial text to find an element. 


 Absolute XPath(): This XPath can easily handle dynamic web elements. It comes
with a complete set of paths for web UI automation, right from the root node.
 StartsWith(): This function helps find an attached attribute to a dynamic web
element by matching or finding the starting text. 

6. Open Source
Selenium is open-source software. It can be easily downloaded from the official Selenium
website.

7. Portability (Ability to work with different Operating Systems)

Selenium is portable software. It can work with different Operating Systems like Linux, Mac,
UNIX, and Windows. 

8. Take less time to execute a test

Selenium reduces the test execution time. This helps make the execution more reliable and
faster. 

9. Server installation is not required

You don’t need to install a server for Selenium. Selenium can interact directly with the
browser.

10. Lesser resources required

Selenium requires lesser resources when compared to its competitors like UFT, RFT, etc.

Drawback of Selenium

 Incomplete solution – Selenium requires third-party frameworks in order to


completely automate the testing of web applications.

 Requires high skills – Though it supports multiple programming languages, it


requires a high-level proficiency to deal with it effectively.

 Hard to modify codes – The scripts written in Selenese are not user-friendly which
makes it hard to modify the codes.

 Tougher to support other browsers – Selenium faces difficulties when trying to


implement in any browser other than Firefox.

What are different selenium versions?


SeleniumAutomation TestingTesting Tools

Selenium 1 or known as RC (Remote Control) As name suggest, RC is a Remote Control


which works by taking the remote of the browser and then injects the automation code to be
tested by injecting the custom scripts written.
The Web Driver (known as Selenium 2) works on the browser directly and uses browsers in-
built features to trigger the automation test written by tester. Web driver is the successor of
Remote Control.

The architecture of Selenium Web driver is as follows -

Selenium 2  is nothing but integration of Web Driver with Selenium RC (Selenium1).


Selenium 1 is a well-established framework which supports various many browsers due to its
JavaScript implementation. To step out of JavaScript Sandbox, Web Driver is developed for
each browser which provides headless browser emulator which is very speedy. The strengths
of both Web Driver and Selenium 1 are imbibed in Selenium2 which also helps in getting rid
of their respective drawbacks.

Selenium 3  For users of Web Driver API’s this is drop-in replacement. The major change
being, removing core and replacing it with back-end Web Driver. Selenium 3.0 has become a
W3C (worldwide web consortium) standard. Also, Selenium 3 would be majorly looking to
be a choice of software testing tool for both web and mobile based applications.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy