5. 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.
10. 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
12. 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.
13. Why Selenium ?
The name, Selenium, was
selected because selenium
mineral supplements serve as
a cure for mercury poisoning,
Huggins explained.
17. Components of Selenium
It has mainly four components.
Selenium Integrated Development Environment (IDE)
Selenium Remote Control (RC)
WebDriver
Selenium Grid
19. 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!
20. 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!
22. 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 .
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.
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 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.
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 this help 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 the analogy between
taxi driving and web driver
test automation work?
What is WebDriver ?
47. 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.
48. Does it start making 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.
53. 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 ?
54. 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.