What Is Selenium
What Is Selenium
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:
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.
>
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:
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
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.
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.
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.
Selenium is capable of handling dynamic web elements with ease. It utilizes some of the
following methods to do that:
6. Open Source
Selenium is open-source software. It can be easily downloaded from the official Selenium
website.
Selenium is portable software. It can work with different Operating Systems like Linux, Mac,
UNIX, and Windows.
Selenium reduces the test execution time. This helps make the execution more reliable and
faster.
You don’t need to install a server for Selenium. Selenium can interact directly with the
browser.
Selenium requires lesser resources when compared to its competitors like UFT, RFT, etc.
Drawback of Selenium
Hard to modify codes – The scripts written in Selenese are not user-friendly which
makes it hard to modify the codes.
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.