01_01_Selenium Overview- Selenium Webdriver
01_01_Selenium Overview- Selenium Webdriver
May-2019
1
RBVH/ENG1
Content
What is Selenium?
Who developed Selenium?
The Same Origin Policy Issue
Birth of Selenium Remote Control (Selenium RC)
Birth of Selenium Grid
Birth of Selenium IDE
Birth of WebDriver
Birth of Selenium 2
So, Why the Name Selenium?
Brief Introduction Selenium IDE
Brief Introduction Selenium Remote Control (Selenium RC)
Brief Introduction WebDriver
Selenium Grid
Note on Browser and Environment Support
How to Choose the Right Selenium Tool for Your Need
A Comparison between Selenium and QTP(now UFT)
Advantages of QTP over Selenium
2
RBVH/ENG1
What is Selenium?
Internal | RBVH/ENG1 | 6/24/2014 | © Robert Bosch Engineering and Business Solutions Vietnam Company Limited 2013. All
rights reserved, also regarding any disposal, exploitation, reproduction, editing, distribution, as well as in the event of
applications for industrial property rights.
RBVH/ENG1
WebDriver
Selenium Grid
Internal | RBVH/ENG1 | 6/24/2014 | © Robert Bosch Engineering and Business Solutions Vietnam Company Limited 2013. All
rights reserved, also regarding any disposal, exploitation, reproduction, editing, distribution, as well as in the event of
applications for industrial property rights.
What is Selenium?
5
Who developed Selenium?
6
Birth of Selenium Remote Control
(Selenium RC)
Unfortunately; testers using Selenium Core had to install the
whole application under test and the web server on their own
local computers because of the restrictions imposed by the same
origin policy. So another ThoughtWork's engineer, Paul
Hammant, decided to create a server that will act as an HTTP
proxy to "trick" the browser into believing that Selenium Core and
the web application being tested come from the same domain.
This system became known as the Selenium Remote
Control or Selenium 1.
7
Birth of Selenium Grid
8
Birth of Selenium IDE
9
Birth of WebDriver
10
Birth of Selenium 2
11
So, Why the Name Selenium?
12
Brief Introduction Selenium IDE
13
Brief Introduction Selenium IDE
14
Brief Introduction Selenium Remote
Control (Selenium RC)
Selenium RC was the flagship testing framework of the whole
Selenium project for a long time. This is the first automated web
testing tool that allowed users to use a programming language
they prefer. As of version 2.25.0, RC can support the following
programming languages:
Java
C#
PHP
Python
Perl
Ruby
15
Brief Introduction Selenium Remote
Control (Selenium RC)
16
Brief Introduction WebDriver
The WebDriver proves itself to be better than both Selenium IDE and
Selenium RC in many aspects. It implements a more modern and stable
approach in automating the browser's actions. WebDriver, unlike Selenium
RC, does not rely on JavaScript for Automation. It controls the browser
by directly communicating with it.
The supported languages are the same as those in Selenium RC.
Java
C#
PHP
Python
Perl
Ruby
17
Brief Introduction WebDriver
18
Selenium Grid
19
How to Choose the Right Selenium Tool for Your Need - Selenium IDE
20
Selenium RC
To design a test using a more expressive language than
Selenese
21
WebDriver
To use a certain programming language in
designing your test case.
22
Selenium Grid
To run your Selenium RC scripts in
multiple browsers and operating
systems simultaneously.
23
A Comparison between Selenium and
QTP(now UFT)
Quick Test Professional(QTP) is a proprietary automated
testing tool previously owned by the company Mercury
Interactive before it was acquired by Hewlett-Packard in
2006. The Selenium Tool Suite has many advantages over QTP
24
Advantages of Selenium over QTP
Selenium QTP
Open source, free to use, and free of Commercial.
charge.
Supports mobile devices QTP Supports Mobile app test automation (iOS
& Android) using HP solution called - HP Mobile
Center
Can execute tests while the browser is Needs to have the application under test to be
minimized visible on the desktop
Can execute tests in parallel. Can only execute in parallel but using Quality
Center which is again a paid product.
25
Advantages of QTP over Selenium
QTP Selenium
Can test both web and desktop Can only test web applications
applications
Comes with a built-in object Has no built-in object repository
repository
Automates faster than Automates at a slower rate because it
Selenium because it is a fully featured does not have a native IDE and only
IDE. third party IDE can be used for
development
Data-driven testing is easier to perform Data-driven testing is more
because it has built-in global and cumbersome since you have to rely on
local data tables. the programming language's
capabilities for setting values for your
test data
Can access controls within the Cannot access elements outside of the
browser(such as the Favorites bar, web application under test
Address bar, Back and Forward buttons,
etc.)
Provides professional customer No official user support is being offered.
support
26
Has native capability to export test Has no native capability to export
data into external formats runtime data onto external formats
Summary
The entire Selenium Tool Suite is comprised of four components:
• Selenium IDE, a Firefox add-on that you can only use in creating relatively simple test
cases and test suites.
• Selenium Remote Control, also known as Selenium 1, which is the first Selenium tool
that allowed users to use programming languages in creating complex tests.
• WebDriver, the newer breakthrough that allows your test scripts to communicate directly
to the browser, thereby controlling it from the OS level.
• Selenium Grid is also a tool that is used with Selenium RC to execute parallel tests across
different browsers and operating systems.
27
RBVH/ENG1
Reference
https://www.guru99.com/introduction-to-selenium.html#1
http://docs.seleniumhq.org/docs/
http://docs.seleniumhq.org/download/maven.jsp
28
Internal | RBVH/ENG1 | 6/24/2014 | © Robert Bosch Engineering and Business Solutions Vietnam Company Limited 2013. All
rights reserved, also regarding any disposal, exploitation, reproduction, editing, distribution, as well as in the event of
applications for industrial property rights.
RBVH/ENG1
Selenium Webdriver
May-2019
29
RBVH/ENG1
What is WebDriver?
WebDriver is a web automation framework that allows you to
execute your tests against different browsers, not just Firefox,
Chrome (unlike Selenium IDE).
WebDriver also enables you to use a programming language in
creating your test scripts (not possible in Selenium IDE).
You can now use conditional operations like if-then-else or
switch-case. You can also perform looping like do-while.
30
What is WebDriver?
languages are supported by
WebDriver
Following programming languages are supported by WebDriver
Java
.Net
PHP
Python
Perl
Ruby
RBVH/ENG1
Difference between Selenium RC and Webdriver
33
Architecture - WebDriver
Architecture - Selenium RC
Speed
Webdriver RC
You are now able to make powerful tests because WebDriver allows you to use a
programming language of your choice in designing your tests.
WebDriver directly talks to the browser while Selenium RC needs the help of the RC Server
in order to do so.