By Naresh Chintalcheru
WHAT IS SELENIUM
● Selenium is a chemical element
● Chemical Symbol Se
● Atomic Number 34
● Atomic Mass 78.96
● Melting Point 428.9F
● Element Classification Non-Metal
● Crystal Structure Hexagonal
INTRODUCTION TO SELENIUM
Who named Automation Testing Tool as Selenium ?
● Jason Huggins and team from ThoughWorks Inc. developed the
testing tool in 2004.
● Huggins joked about competitor HP Mercury Tools saying cure
mercury poisoning by taking Selenium supplements.
● Hence the name ………
WHAT IS SELENIUM
• Selenium is an Open Source Browser based
Test Automation software.
WHAT IS SELENIUM
• Selenium is a robust set of suite of tools which
supports rapid development of test automation for
• Hooks for many other languages - Java, Ruby, Python
TESTING TOOLS IN THE MARKET
Commercial Testing Tools
● HP Mercury WinRunner
● IBM Rational Functional Tester
● Micro Focus Silk Test
Open Source Testing Tools
WHAT IS SELENIUM
Selenium is ………
● Browser based Web Application testing tool
● Open Source License
● Extensible Framework
● Support Mobile Testing Android/iOS
● Write Test Cases using Language of choice Java, C#,
Python, Ruby & HTML
● Supports Native Browser Testing
ADVANTAGES OF SELENIUM
Advantages of Selenium
● Open Source, free of cost for companies
● Supports Native Testing for all major Browsers
● Customize According to the Requirements
● AJAX based Testing
● Only tool to support Test Case Language of Choice Java, C#,
Python & Ruby.
● Selenium 2 .., Web Drivers is developed by Google and all the
google products are tested with Selenium.
● Web 2.0 companies such as Facebook, Twitter, LinkedIn,
Groupon uses Selenium.
● Selenium 2 (Google Inc)
● Selenium Web Drivers
All browsers provide Native extensions
Selenium Web Driver APIs allow
driving a browser Natively for
automation testing is the advanced
feature google added to Selenium.
developed by the Jason Huggins and ThoughtWorks Team.
● Selenium Core is the foundation for other components
Selenium IDE & Selenium RC
● Can do Record and Playback
● Create & edit Test Cases & Test Suites
● Extensions for Firefox
● Run Selenese Commands
● Convert Test Case to different languages
Try the test in
the Web based
Reference of the
GENERAL SELENESE COMMANDS
● clicking a link - click or clickAndWait commands
● entering values - type command
● selecting options from a drop-down listbox - select
● clicking checkboxes or radio buttons - click
RUNNING YOUR FIRST SELENIUM
● Make sure the application is in the common base
● Click on the run button. Here you can also control
the speed of the execution using the
● Once the test is run you can view the test log in the
bottom of the IDE window
CREATING A TEST SUITE
● In the Selenium IDE you
can create any number of
test cases and save them
as test suite.
● To Run the test Suite click
on the “Play entire test
suite” button as shown
PLAYING THE TEST SUITE WITH TEST
● Test Runner allows you to run the test case in a browser
loaded with the Selenium-Core TestRunner.
● Test runner is invoked by clicking the below Shown button
in the IDE
On Clicking the Test Runner Button you will the
window as seen in the next slide
Click this button to run all the
Run a Test Case
Click the Run button to run the currently displayed test case.
Run a Test Suite
Click the Run All button to run all the test cases in the
currently loaded test suite.
Stop and Start
The Pause button can be used to stop the test case while it
is running. The icon of this button then changes to indicate
the Resume button. To continue click Resume.
Stop in the Middle
You can set a breakpoint in the test case to cause it to stop
on a particular command. This is useful for debugging your
test case. To set a breakpoint, select a command, right-
click, and from the context menu select Toggle Breakpoint.
Selenium Remote Control (RC) :
● Selenium RC is a test tool that allows you to write
automated web application UI tests in any
programming language against any HTTP website
Selenium RC comes in two parts.
● A server which automatically launches and kills
browsers, and acts as a HTTP proxy for web
requests from them.
● Client libraries for your favorite computer language.
SELENIUM WEB DRIVERS
● Selenium Web Driver is in version 2.0
● Selenium Web Driver APIs makes Native API calls to the
● Native automation faster and a little less prone to
error and browser configuration
● Does not Requires Selenium-RC Server to be
● Access to headless HTMLUnit can allow really fast
● Selenium Web Driver will replace Selenium RC
● Selenium-Grid allows the Selenium-RC solution to scale
for test suites or test suites to be run in multiple
● With Selenium-Grid multiple instances of Selenium-RC
are running on various operating system and browser
configurations, each of these when launching register
with a hub. When tests are sent to the hub they are then
redirected to an available Selenium-RC, which will launch
the browser and run the test.
● This allows for running tests in parallel, with the entire
test suite theoretically taking only as long to run as the
longest individual test.