AN OVERVIEW
OF
SELENIUM WEBDRIVER
ANURAJ S.L
Lead QA Engineer
What is Selenium?
Is that what we are looking for ?

What is Selenium?
Selenium is a free (open
source) automated testing suite
for web applications across
different browsers and
platforms.
In short it automates browser.
That’s it.
SELENIUM AUTOMATES BROWSERS
ALL MAJOR BROWSERS
ON ALL MAJOR (DESKTOP) OPERATING SYSTEMS
… AND MOBILE*
* Via Appium, Selendroid, ios-driver and WP driver.
No Proprietary IDE / Language
Who developed Selenium?
Who developed Selenium?
Since Selenium is a collection of
different tools, it had different
developers as well. Some key
contributors
Jason Huggins
Patrick Lightbody
Shinya Kasatani
Why the name Selenium ?
Why Selenium ?
It came from a joke which Jason cracked one time to
his team. Another automated testing framework was
popular during Selenium's development, and it was by
the company called Mercury Interactive (yes, the
company who originally made QTP before it was
acquired by HP). Since Selenium is a well-known
antidote for Mercury poisoning, Jason suggested that
name.
Why Selenium ?
The name, Selenium, was
selected because selenium
mineral supplements serve as
a cure for mercury poisoning,
Huggins explained.
Why do we Automate ?
Why do we Automate ?
What do we do with Selenium ?
Components of Selenium
It has mainly four components.
 Selenium Integrated Development Environment (IDE)
 Selenium Remote Control (RC)
 WebDriver
 Selenium Grid
Selenium IDE
Components of Selenium
Selenium IDE
PROS:
• No programming skills required
• Easy record and playback
• Step by step debugger
• Play tests on any browser
• Export tests as Webdriver tests
• Extensible
CONS:
• Based on Selenium Core
• No code reuse
• No iterations and conditional statements
• No exception handling
• No error recovery
A Firefox Add-on for recording, editing and running tests.
Over 10M downloads to date!
Selenium IDE
PROS:
• No programming skills required
• Easy record and playback
• Step by step debugger
• Play tests on any browser
• Export tests as Webdriver tests
• Extensible
CONS:
• Based on Selenium Core
• No code reuse
• No iterations and conditional statements
• No exception handling
• No error recovery
A Firefox Add-on for recording, editing and running tests.
Over 10M downloads to date!
Selenium RC
Components of Selenium
Selenium RC
•You first need to launch a separate application called Selenium Remote Control (RC) Server.
•The Selenium RC Server acts as a "middleman" between your Selenium commands and your browser.
•When you begin testing, Selenium RC Server "injects" a Javascript program called Selenium Core into the browser.
•Once injected, Selenium Core will start receiving instructions relayed by the RC Server from your test program.
•When the instructions are received, Selenium Core will execute them as Javascript commands.
•The browser will obey the instructions of Selenium Core, and will relay its response to the RC Server.
•The RC Server will receive the response of the browser and then display the results to you.
•RC Server will fetch the next instruction from your test script to repeat the whole cycle .
Selenium RC
Selenium 2
Selenium
WebDriver
Selenium
Grid
Selenium
IDE
Browser
Automation API
Local + Remote
Centrally managed
parallel execution in
diverse environments
A FF record-playback
tool mostly used for
fast prototyping
Selenium WebDriver
Components of Selenium
What is WebDriver ?
What is WebDriver ?
WebDriver is a web automation
framework that allows you to execute
your tests against different
browsers.
IEDriverServer.exe
XPCOM
COM
webdriver.xpi
Selenium WebDriver
What is WebDriver ?
Have you really understood
What actually is WebDriver?
What is WebDriver ?
The official site says that:
“WebDriver is a tool for automating web application testing, and in particular to verify that they work as expected.
It aims to provide a friendly API that’s easy to explore and understand, easier to use than the Selenium-RC (1.0)
API, which will help to make your tests easier to read and maintain.
It’s not tied to any particular test framework, so it can be used equally well in a unit testing or from a plain old
“main” method.”
What is WebDriver ?
Generally there might have questions about this definition.
What is a framework?
What is an API?
How does Selenium RC works?
What is unit testing ?
Too many questions instead of an answer
What is WebDriver ?
Is there an easier way of
understanding what
WebDriver test automation
is?
What is WebDriver ?
Can test automation with Selenium WebDriver be explained in very simple terms so that everyone can
understand it, even without having any technical knowledge?
An easy way of explaining how a new thing is through an analogy with something else that
you already know.
WebDriver test
automation is like driving
a taxi !!!

What is WebDriver ?
WebDriver test
automation is like driving
a taxi !!!

What is WebDriver ?
REALLY ????
What is WebDriver ?
The WebDriver points to the analogy.
Everyone knows what a driver is and what he does.
Many people drive a car.
Those who don't drive a car use the services of taxi drivers.
What is WebDriver ?
Who participates in taxi driving?
3 actors are involved:
1. The customer
2. The taxi driver
3. The car
What is WebDriver ?
What happens while driving a taxi?
Dialogues between the 3 actors involved.
So this is the analogy
used to explain test
automation with
WebDriver.
What is WebDriver ?
Test automation with WebDriver is like driving a taxi.
It happens through dialogues between the 3 actors involved.
What is WebDriver ?
Lets have a closer look at taxi driving.
A customer gets into a cab.
He gives instructions to the taxi driver about
1) the address and
2) the route to take
What is WebDriver ?
Now the cab driver drives the taxi, the car in this case.
While driving the taxi, the driver gives commands to the car
using the wheel, pedals, etc.
What is WebDriver ?
The driver receives information about the cab’s status on the
meters and makes decisions based on it.
The car executes the taxi driver commands to get to the desired
address.
How does this help with
understanding test
automation ?
What is WebDriver ?
What is WebDriver ?
Let's ask about test automation the same questions asked for
driving a taxi.
Who participates in test automation?
There are 3 actors in test automation with WebDriver:
1. tester that writes the automation code
2. browser driver
3. browser
What is WebDriver ?
What happens during test automation?
Dialogue between the 3 actors involved.
How do the analogy between
taxi driving and web driver
test automation work?
What is WebDriver ?
How do the analogy between
taxi driving and web driver
test automation work?
What is WebDriver ?
Let's see:
A test engineer is like a taxi customer.
The test automation code is like the customer instructions to
the taxi driver.
The browser driver object is like the taxi driver.
The browser is like a car.
Does it start making sense?
Taxi driving versus test
automation?
What is WebDriver ?
What is WebDriver ?
Let's have a closer look at test automation.
The test engineer writes code with instructions for the browser
driver object.
He tells the browser driver object to
1) open the site and
2) interact with the site elements.
What is WebDriver ?
The browser driver drives the browser.
It does this by sending commands to the browser.
What is WebDriver ?
The browser driver receives information from the browser about
• status of site elements (are they visible, are they enabled)
• values of site elements
and makes decisions based on it.
The browser executes the commands received from the browser
driver.
Is the analogy clear now?
What is WebDriver ?
WebDriver Vs Selenium RC
Both WebDriver and Selenium RC have following features:
They both allow you to use a programming language in designing your
test scripts.
They both allow you to run your tests against different browsers.
So how do they differ ?
WebDriver Vs Selenium RC
Architecture : WebDriver's architecture is simpler than Selenium
RC's.
It controls the browser from the OS level. All you need are your programming
language's IDE (which contains your Selenium commands) and a browser.
WebDriver Vs Selenium RC
Speed:
WebDriver Vs Selenium RC
Real-life Interaction:
WebDriver Vs Selenium RC
WebDriver Vs Selenium RC
References
 Guru 99 - http://www.guru99.com
 Test-able Blog - http://test-able.blogspot.in
THANK YOU !!!
Thank You !!!

An overview of selenium webdriver

  • 1.
  • 2.
  • 4.
    Is that whatwe are looking for ? 
  • 5.
    What is Selenium? Seleniumis a free (open source) automated testing suite for web applications across different browsers and platforms. In short it automates browser. That’s it.
  • 6.
    SELENIUM AUTOMATES BROWSERS ALLMAJOR BROWSERS ON ALL MAJOR (DESKTOP) OPERATING SYSTEMS
  • 7.
    … AND MOBILE* *Via Appium, Selendroid, ios-driver and WP driver.
  • 8.
  • 9.
  • 10.
    Who developed Selenium? SinceSelenium is a collection of different tools, it had different developers as well. Some key contributors Jason Huggins Patrick Lightbody Shinya Kasatani
  • 11.
    Why the nameSelenium ?
  • 12.
    Why Selenium ? Itcame from a joke which Jason cracked one time to his team. Another automated testing framework was popular during Selenium's development, and it was by the company called Mercury Interactive (yes, the company who originally made QTP before it was acquired by HP). Since Selenium is a well-known antidote for Mercury poisoning, Jason suggested that name.
  • 13.
    Why Selenium ? Thename, Selenium, was selected because selenium mineral supplements serve as a cure for mercury poisoning, Huggins explained.
  • 14.
    Why do weAutomate ?
  • 15.
    Why do weAutomate ?
  • 16.
    What do wedo with Selenium ?
  • 17.
    Components of Selenium Ithas mainly four components.  Selenium Integrated Development Environment (IDE)  Selenium Remote Control (RC)  WebDriver  Selenium Grid
  • 18.
  • 19.
    Selenium IDE PROS: • Noprogramming skills required • Easy record and playback • Step by step debugger • Play tests on any browser • Export tests as Webdriver tests • Extensible CONS: • Based on Selenium Core • No code reuse • No iterations and conditional statements • No exception handling • No error recovery A Firefox Add-on for recording, editing and running tests. Over 10M downloads to date!
  • 20.
    Selenium IDE PROS: • Noprogramming skills required • Easy record and playback • Step by step debugger • Play tests on any browser • Export tests as Webdriver tests • Extensible CONS: • Based on Selenium Core • No code reuse • No iterations and conditional statements • No exception handling • No error recovery A Firefox Add-on for recording, editing and running tests. Over 10M downloads to date!
  • 21.
  • 22.
    Selenium RC •You firstneed to launch a separate application called Selenium Remote Control (RC) Server. •The Selenium RC Server acts as a "middleman" between your Selenium commands and your browser. •When you begin testing, Selenium RC Server "injects" a Javascript program called Selenium Core into the browser. •Once injected, Selenium Core will start receiving instructions relayed by the RC Server from your test program. •When the instructions are received, Selenium Core will execute them as Javascript commands. •The browser will obey the instructions of Selenium Core, and will relay its response to the RC Server. •The RC Server will receive the response of the browser and then display the results to you. •RC Server will fetch the next instruction from your test script to repeat the whole cycle .
  • 23.
  • 24.
    Selenium 2 Selenium WebDriver Selenium Grid Selenium IDE Browser Automation API Local+ Remote Centrally managed parallel execution in diverse environments A FF record-playback tool mostly used for fast prototyping
  • 25.
  • 26.
  • 27.
    What is WebDriver? WebDriver is a web automation framework that allows you to execute your tests against different browsers.
  • 28.
  • 29.
    What is WebDriver? Have you really understood What actually is WebDriver?
  • 30.
    What is WebDriver? The official site says that: “WebDriver is a tool for automating web application testing, and in particular to verify that they work as expected. It aims to provide a friendly API that’s easy to explore and understand, easier to use than the Selenium-RC (1.0) API, which will help to make your tests easier to read and maintain. It’s not tied to any particular test framework, so it can be used equally well in a unit testing or from a plain old “main” method.”
  • 31.
    What is WebDriver? Generally there might have questions about this definition. What is a framework? What is an API? How does Selenium RC works? What is unit testing ? Too many questions instead of an answer
  • 32.
    What is WebDriver? Is there an easier way of understanding what WebDriver test automation is?
  • 33.
    What is WebDriver? Can test automation with Selenium WebDriver be explained in very simple terms so that everyone can understand it, even without having any technical knowledge? An easy way of explaining how a new thing is through an analogy with something else that you already know.
  • 34.
    WebDriver test automation islike driving a taxi !!!  What is WebDriver ?
  • 35.
    WebDriver test automation islike driving a taxi !!!  What is WebDriver ? REALLY ????
  • 36.
    What is WebDriver? The WebDriver points to the analogy. Everyone knows what a driver is and what he does. Many people drive a car. Those who don't drive a car use the services of taxi drivers.
  • 37.
    What is WebDriver? Who participates in taxi driving? 3 actors are involved: 1. The customer 2. The taxi driver 3. The car
  • 38.
    What is WebDriver? What happens while driving a taxi? Dialogues between the 3 actors involved.
  • 39.
    So this isthe analogy used to explain test automation with WebDriver. What is WebDriver ? Test automation with WebDriver is like driving a taxi. It happens through dialogues between the 3 actors involved.
  • 40.
    What is WebDriver? Lets have a closer look at taxi driving. A customer gets into a cab. He gives instructions to the taxi driver about 1) the address and 2) the route to take
  • 41.
    What is WebDriver? Now the cab driver drives the taxi, the car in this case. While driving the taxi, the driver gives commands to the car using the wheel, pedals, etc.
  • 42.
    What is WebDriver? The driver receives information about the cab’s status on the meters and makes decisions based on it. The car executes the taxi driver commands to get to the desired address.
  • 43.
    How does thishelp with understanding test automation ? What is WebDriver ?
  • 44.
    What is WebDriver? Let's ask about test automation the same questions asked for driving a taxi. Who participates in test automation? There are 3 actors in test automation with WebDriver: 1. tester that writes the automation code 2. browser driver 3. browser
  • 45.
    What is WebDriver? What happens during test automation? Dialogue between the 3 actors involved.
  • 46.
    How do theanalogy between taxi driving and web driver test automation work? What is WebDriver ?
  • 47.
    How do theanalogy between taxi driving and web driver test automation work? What is WebDriver ? Let's see: A test engineer is like a taxi customer. The test automation code is like the customer instructions to the taxi driver. The browser driver object is like the taxi driver. The browser is like a car.
  • 48.
    Does it startmaking sense? Taxi driving versus test automation? What is WebDriver ?
  • 49.
    What is WebDriver? Let's have a closer look at test automation. The test engineer writes code with instructions for the browser driver object. He tells the browser driver object to 1) open the site and 2) interact with the site elements.
  • 50.
    What is WebDriver? The browser driver drives the browser. It does this by sending commands to the browser.
  • 51.
    What is WebDriver? The browser driver receives information from the browser about • status of site elements (are they visible, are they enabled) • values of site elements and makes decisions based on it. The browser executes the commands received from the browser driver.
  • 52.
    Is the analogyclear now? What is WebDriver ?
  • 53.
    WebDriver Vs SeleniumRC Both WebDriver and Selenium RC have following features: They both allow you to use a programming language in designing your test scripts. They both allow you to run your tests against different browsers. So how do they differ ?
  • 54.
    WebDriver Vs SeleniumRC Architecture : WebDriver's architecture is simpler than Selenium RC's. It controls the browser from the OS level. All you need are your programming language's IDE (which contains your Selenium commands) and a browser.
  • 55.
  • 56.
    WebDriver Vs SeleniumRC Real-life Interaction:
  • 57.
  • 58.
  • 59.
    References  Guru 99- http://www.guru99.com  Test-able Blog - http://test-able.blogspot.in
  • 60.