2 - Introduction To Selenium
2 - Introduction To Selenium
To
Selenium
1
Table of Contents
1. What is Selenium?
2. Selenium Components
3. Who developed Selenium?
4. Selenium IDE
❑ Benefits of Selenium IDE
❑ Drawbacks of Selenium IDE
5. Selenium RC
6. Selenium WebDriver
❑ Selenium WebDriver Architecture
2
7. Selenium Grid
❑ Features
❑ When to use Selenium Grid
8. 8 Platforms supported by Selenium
❑ Operating Systems
❑ Browsers
❑ Programming Languages
❑ Testing Frameworks
9. Advantages of Selenium
10.Disadvantages of Selenium
11.Advantages of Selenium over QTP
3
What is Selenium?
SELENIUM is a free (open-source) automated testing
framework used to validate web applications across different
browsers and platforms. You can use multiple programming
languages like Java, C#, Python etc. to create Selenium Test
Scripts. Testing done using the Selenium tool is usually
referred to as Selenium Testing.
4
Selenium Components
Selenium is not just a single tool but is a combination of different suites of
software. Selenium has four components.
03 Selenium WebDriver
04 Selenium Grid
5
6
Who developed Selenium?
7
An engineer at ThoughtWorks, he was working on a web
application that required frequent testing. Having realized
that the repetitious Manual Testing of their application
was becoming more and more inefficient, he created a
JavaScript program that would automatically control the
browser's actions. He named this program as the
"JavaScriptTestRunner“.
8
Selenium IDE
9
Benefits of Selenium IDE
It is used to
Has built- No create and
Very use
in test programming execute Test
to use
results experience is cases using
and
reporting required Firefox or
install
module Chrome
browsers
The user
The user The user
can easily
can edit can create
record the
the Test Test Suites.
Test
scripts
scripts
10
Drawbacks of Selenium IDE:
It doesn’t
It doesn’t support error
support iteration handling
statements
Available only
No support for in Firefox and
conditional Chrome
statements Drawbacks
It doesn’t generate
It does not a detailed Test
support Reports summary.
Database testing
11
Selenium RC
12
Selenium RC
13
Selenium RC
14
Selenium RC
15
Selenium WebDriver
16
Selenium WebDriver Architecture
17
Selenium WebDriver Architecture
18
Selenium WebDriver Architecture
19
Selenium WebDriver Architecture
20
Selenium Grid
21
Features
04
Perform cross browser testing.
22
When to use Selenium Grid
You should use Selenium Grid when you want to do either one or both
of the following:
When you run your tests against various browsers, operating systems,
and machines all at the same time. This will ensure that the application
you are testing is fully compatible with a wide range of browser
operating system combinations.
Save execution time of your test suites. If you set up Selenium Grid to
run, say, 5 tests at a time, then you would be able to finish the whole
suite around 5 times faster.
23
Platforms supported by Selenium
Selenium works with different Operating systems, browsers,
programming languages and Testing Frameworks.
Operating Systems:
❑ Microsoft Windows
❑ Macintosh
❑ Linux
Browsers:
❑ Mozilla Firefox
❑ Google Chrome
❑ Internet Explorer
❑ Safari
❑ Opera etc.
24
Programming Languages Testing Frameworks
❑ Java ❑ C#.Net – NUnit
❑ C#.Net ❑ Java – JUnit or TestNG
❑ Perl ❑ Python – unittest, pyunit
❑ Python ❑ PHP – Behat + mink
❑ Ruby
❑ PHP
25
Advantages of Selenium
26
Disadvantages of Selenium
27
Advantages of Selenium over QTP
Selenium QTP
Open source, free to use, and free of Commercial.
charge.
Highly extensible Limited add-ons
Can run tests across different browsers Can only run tests in Firefox, Internet
Explorer and Chrome
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.
28