Sie sind auf Seite 1von 34

Web Browser Automation for

Testing Web Apps using


Selenium 2

Srikar Konda
16311A1277
Agenda
• Introduction to Selenium
• History
• Components of Selenium
• WebDriver
• Selenium2
• How to install
• Our project
• Demo
W h a t is Selenium ?

Selenium is a free and open


source automated testing suite for
web applications across different
browsers and platforms.
It is designed for acceptance
testing.
HISTORY
• Selenium was created by Jason Huggins in 2004.
• He was working on a web application that required
frequent Manual testing and realized it is certainly
inefficient.
• Then he created a JavaScript program that would
automatically control the browser's actions and named
it "JavaScriptTestRunner.“

• Seeing potential in this idea to help automate other web


applications, he made JavaScriptRunner (open-source)
which was later re-named as Selenium Core.
Components
Drawbacks of SeleniumCore
• Under same origin policy a JavaScript program can only
access pages on the same domain where it belongs. It can not
access pages from different domains.

• Testers using Selenium Core also had to install the local


copies of whole application under test and the web server on
their own local computers so they would belong to the same
domain.
Solution ?
Selenium RC
• 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.

• The system latterly named as Selenium Remote Control


(Selenium RC).

• Apparently it became the first automated web testing tool that


allowed users to use a programming language they prefer.
Selenium IDE

● Selenium Integrated Development Environment


(IDE) is the simplest framework in the Selenium
suite

● It is one of the easiest one to learn.

● It is a Firefox plugin that you can install with all


ease alike other plugins.
WebDriver i n Selenium
Issue:-
Browsers and web applications were becoming more powerful
and more restrictive with JavaScript programs like Selenium
Core.
Solution:-
Simon Stewart created WebDriver (the was the first cross-
platform testing framework that could control the browser from
the OS level) in 2006 .

Selenium-WebDriver makes direct calls to the browser using each


browser’s native support for automation. The direct calls made are
subjective to the browsers being automated.
Selenium2
In 2008, the whole Selenium Team decided to
merge WebDriver and Selenium RC to form a more
powerful tool called Selenium 2, with WebDriver being
the core.

It supports the WebDriver API and underlying


technology, along with the Selenium1 technology
underneath the WebDriver API.
Browsers compatible w i t h
Selenium2
•Google Chrome
•Internet Explorer 7, 8, 9, 10, and 11 on appropriate combinations of
Vista, Windows 7, Windows 8, and Windows 8.1. As of April 15 2014, IE
6 is no longer supported. The driver supports running 32-bit and 64-
bit versions of the browser where applicable.

• Firefox: latest ESR, previous ESR, current release, one previous


release
• Safari
• Opera
• HtmlUnit
• phantomjs
• Android (with Selendroid orappium)
• iOS (with ios-driver orappium)
Software Requirement

➢ IDE: Eclipse
➢ WebDriver: Chrome Driver
H o w t o i ns tall ?
Open : https://www.seleniumhq.org/download/

download from site


Open Eclipse and create java project.
Once project created → right click on project.
→ Select properties.
→ Addjar files.
Proposed System
•Our project tests 4 existing web based application.
•Automation in acceptance testing is the key here.
•It provides a reliable verification of browser-accessed
software.
•We have automated a Website and three Web pages in order
to test them.
•One just has to execute the program and the script will
complete the further tasks.
•It reduces cost and workload due to manual testing.
•It is a tester friendly program.
Sequence Diagram
DEMO
User Interface
FB Login
FB Register
RGPV Sign I n
Railway Enquiry
Reserved Trains
Captcha
Availability Enquiry
Fare E n q u i r y
T r a i n Schedule
PNR
Thank you

Das könnte Ihnen auch gefallen