SlideShare a Scribd company logo
Selenium – Testing Tool
Seleniumonlinetraining.info
What is Selenium?
• Selenium is a robust set of tools that supports rapid
development of test automation for web-based
applications.
• Works anywhere JavaScript is supported
• Hooks for many other languages - Java, Ruby,
Python
• Can simulate a user navigating through pages and
then assert for specific marks on the pages
• All you need to really know is HTML to start
using it right awayseleniumonlinetraining.info
Selenium
• You can use open source - Selenium tool
• Selenium IDE is a plug-in to Firefox to record and
playback tests (like WinRunner, QTP).
• You can then export the recorded test in most
language e.g. HTML, Java , .NET , Perl , Ruby etc.
• The exported test can be run in any browser and
any platform using "selenium remote control".
seleniumonlinetraining.info
Where to get it?
• You can use Selenium-Core and customize
everything – deprecated.
• But it is easier to just get a Firefox plug-in
“Selenium-IDE” that helps you “record” test
Cases.
• You can record how an app is being used and then
playback those recordings followed by asserts.
• Get everything at:www.seleniumonlinetraining.info
seleniumonlinetraining.info
Selenium Components
seleniumonlinetraining.info
Selenium-IDE
• Integrated Development Environment for building Selenium test
cases.
• Operates as a Firefox add-on and provides an interface for
developing and running individual test cases or entire test
suites.
• Selenium-IDE has a recording feature, which will keep account
of user actions as they are performed and store them as a
reusable script to play back.
• It also has a context menu (right-click) integrated with the
Firefox browser, which allows the user to pick from a list of
assertions and verifications for the selected location.
• Offers full editing of test cases.
• Although it is a Firefox only add-on, tests created in it can also
be run against other browsers by using Selenium-RC &
specifying the name of the test suite on the command line.
Selenium-RC (Remote Control)
• Selenium-RC provides an API (Application
Programming Interface) and library for each of its
supported languages: HTML, Java, C#, Perl, PHP,
Python, and Ruby.
• This ability to use Selenium-RC with a high-level
programming language to develop test cases also
allows the automated testing to be integrated with a
project’s automated build environment.
seleniumonlinetraining.info
Selenium-Grid
Selenium-Grid allows the Selenium-RC solution to scale for
test suites or test suites to be run in multiple environments.
• With Selenium-Grid multiple instances of Selenium-RC are
running on various operating system and browser
configurations, each of these when launching register with a
hub. When tests are sent to the hub they are then redirected
to an available Selenium-RC, which will launch the browser
and run the test.
• This allows for running tests in parallel, with the entire test
suite theoretically taking only as long to run as the longest
individual test.
Steps to start with Selenium!
1) Begin: write and run tests in Firefox.
Selenium IDE is a Firefox add-on that records clicks, typing,
and other actions to make a test, which you can play back in
the browser.
2) Customize: your language, your browser.
Selenium Remote Control (RC) runs your tests in multiple
browsers and platforms. Tweak your tests in your preferred
language.
3) Deploy: scale out, speed up
Selenium Grid extends Selenium RC to distribute your tests
across multiple servers, saving you time by running tests in
parallel. seleniumonlinetraining.info
Browser Selenium-IDE Selenium-RC Operating Systems
Firefox 3
1.0 Beta-1 & 1.0 Beta-2:
Record and playback tests
Start browser, run tests Windows, Linux, Mac
Firefox 2
1.0 Beta-1: Record and
playback tests
Start browser, run tests Windows, Linux, Mac
IE 8 Under development Windows
IE 7
Test execution only via
Selenium-RC
Start browser, run tests Windows
Safari 3
Test execution only via
Selenium-RC
Start browser, run tests Mac
Safari 2
Test execution only via
Selenium-RC
Start browser, run tests Mac
Opera 9
Test execution only via
Selenium-RC
Start browser, run tests Windows, Linux, Mac
Opera 8
Test execution only via
Selenium-RC
Start browser, run tests Windows, Linux, Mac
Google Chrome
Test execution only via
Selenium-RC(Windows)
Start browser, run tests Windows
Others
Test execution only via
Selenium-RC
Partial support possible As applicable
Supported Browsers
* Tests developed on Firefox via Selenium-IDE can be executed on any other supported
browser via a simple Selenium-RC command line.
seleniumonlinetraining.info
Selenium Commands – Selenese
1) Actions are commands that generally manipulate the state of
the application. They do things like “click this link” and “select
that option”.
• Can be called with “AndWait” suffix, e.g. “clickAndWait”.
2) Accessors examine the state of the application and store the
results in variables, e.g. “storeTitle”.
• They are also used to automatically generate Assertions.
3) Assertions are like Accessors, but verify that the state of the
application conforms to what is expected. Eg. “make sure the
page title is X”, “verify that this checkbox is checked”.
• All Selenium Assertions can be used in 3 modes: “assert”,
“verify”, and ” waitFor”. For example, you can “assertText”,
“verifyText” and “waitForText”.
seleniumonlinetraining.info
Selenium IDE
The list of
actions in the
actual test
case
to execute
The root of web
application you
want to test
The log of the
events that were
executed, including
any errors or
warning that may
have occurred
Selenium IDE
Execution
Commands
Record test
actions
Try the test in
the Web based
TestRunner
Specify commands,
including asserts
Reference of the
currently selected
command
seleniumonlinetraining.info
Test Suite
Execution
Control
Test Cases
Steps of the
test case
Application
being tested
TestRunner Control
www.Seleniumonlinetraining.info
TestRunner Control Pause/Play
Execution
Step through
Execution
Control Speed
of Execution
Summary of
the Test
View the log of
the current
execution
View the DOM
of the current
Page being tested
Highlight
Elements in the
Execution
Run All Tests
Run Selected Test
www.Seleniumonlinetraining.info
Test Creation Demo in
http://test.roosterit.com/
www.Seleniumonlinetraining.info
Login to http://test.roosterit.com/
Click on Tools || Selenium IDE
www.Swww.Sewww.Seleniumonli
Selenium IDE in recording Mode
www.Seleniumonlinetraining.info
Wseleniumonlinetraining.infoww.S
Add Consultant Details
Click On Submit
wwsssw.Seleniumonlinetraining.in
fo
Inserted Successfully
Selenium IDE
records the Test
Steps
Stop Recording
sss
Save Test Case/Test Suite
ss
Make the
required
changes to
the Test Case
change Click
to
clickAndWait
command
s
Make the required
changes to the Test
Case – change the
email id in the
second parameter
Make other
changes
s
Second Test Case:
searchConsultant
1) Record
2) Stop Recording
3) Save with a Name
4) Make Required
Changes to
parameters or
Commands
5) Play
Run the entire Test Suite/Each Test Case
See RESULT Here
Test Suite on Firefox
www.Seleniumonlinetrasselenium
-ssssssssining.info
addConsultant
Test Case
Changes made to
addConsultant
Test Case
searchConsultant
Test Case
www.Seleniumonlinetraining.info
Test Case Saved in HTML Tabular Format
www.Swww.Seleniumonlinetrainin
g.info
Creating a Test Suite
A Test Suite in Selenium is just an HTML file that contains a
table of links to tests
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta content="text/html; charset=UTF-8" http-equiv="content-type" />
<title>Test Suite</title>
</head>
<body>
<table id="suiteTable" cellpadding="1" cellspacing="1" border="1"
class="selenium">
<tbody>
<tr><td><b>Test Suite</b></td></tr>
<tr><td><a href="addConsultant.html">addConsultant</a></td></tr>
<tr><td><a href="searchConsultant">searchConsultant</a></td></tr>
</tbody>
</table>
</body>
</html>
www.Seleniumonlinetraining.info
TestRunner Demo
Execute Tests created inside the Firefox
TestRunner.
www.Seleniumonlinetraining.info
addConsultant TestRunner Mode
www.Seleniumonlinetraining.info
searchConsultant in Execution Mode - TestRunner
www.Seleniumonlinetraining.info
Questions?
www.Seleniumonlinetraining.info

More Related Content

PDF
SSL Pinning and Bypasses: Android and iOS
PDF
Java11 New Features
PPT
Selenium
PDF
Angular - Chapter 7 - HTTP Services
PDF
Guia rapido java v2
DOCX
Realtime selenium interview questions
PDF
"15 Technique to Exploit File Upload Pages", Ebrahim Hegazy
PPTX
JSON: The Basics
SSL Pinning and Bypasses: Android and iOS
Java11 New Features
Selenium
Angular - Chapter 7 - HTTP Services
Guia rapido java v2
Realtime selenium interview questions
"15 Technique to Exploit File Upload Pages", Ebrahim Hegazy
JSON: The Basics

What's hot (20)

PPTX
Microservices Security
PPT
Sql injection
PPTX
Presentation on Visual Studio
PDF
How to steal and modify data using Business Logic flaws - Insecure Direct Obj...
PPTX
android sqlite
PDF
Basic Java Programming
PPTX
Spring boot
PDF
Html5-Web-Storage
PPTX
Selenium introduction
PDF
Introduction to Java 11
PDF
Spring Boot
PPTX
Important features of java
PDF
Intro to Asynchronous Javascript
PDF
Reactive Java Microservices with Spring Boot and JHipster - Spring I/O 2022
PDF
JavaScript - Chapter 15 - Debugging Techniques
PPT
Java Networking
PPT
ASP.NET MVC Presentation
PPSX
Coding standard
PPT
Proxy Servers
PPTX
Introduction to java
Microservices Security
Sql injection
Presentation on Visual Studio
How to steal and modify data using Business Logic flaws - Insecure Direct Obj...
android sqlite
Basic Java Programming
Spring boot
Html5-Web-Storage
Selenium introduction
Introduction to Java 11
Spring Boot
Important features of java
Intro to Asynchronous Javascript
Reactive Java Microservices with Spring Boot and JHipster - Spring I/O 2022
JavaScript - Chapter 15 - Debugging Techniques
Java Networking
ASP.NET MVC Presentation
Coding standard
Proxy Servers
Introduction to java
Ad

Viewers also liked (20)

PPTX
Selenium IDE
PDF
Victor Dyptan.Using Selenium IDE for automated testing.Drupal Camp Kyiv 2011
PPTX
Selenium ui paradigm - DDD North 2
PPTX
Automated Web Testing Using Selenium
PPTX
Automation Testing
PDF
Automation Testing using Selenium
PPTX
Selenium
PPTX
Automated Testing for Websites With Selenium IDE
PPTX
Test Automation and Selenium
PDF
Selenium IDE
PPT
Qtp 80 Basics3561
PDF
Ten reasons why now is the perfect time to get serious about the mobile web
PPT
Achieving a Winning Digital User Experience with Real World Testing
PPTX
Selenium Testing
PPTX
TechTalk: Report Bugs Like a Boss
PPTX
Webinar: Appium & Perfecto: A Perfect Match
PPT
Qtp 8.0 basic
PPTX
How to Test on the Right Mobile Platforms
PPTX
QTP Automation Testing Tutorial 2
PPTX
TechTalk: Taking the Mystery Out of Object ID Automation
Selenium IDE
Victor Dyptan.Using Selenium IDE for automated testing.Drupal Camp Kyiv 2011
Selenium ui paradigm - DDD North 2
Automated Web Testing Using Selenium
Automation Testing
Automation Testing using Selenium
Selenium
Automated Testing for Websites With Selenium IDE
Test Automation and Selenium
Selenium IDE
Qtp 80 Basics3561
Ten reasons why now is the perfect time to get serious about the mobile web
Achieving a Winning Digital User Experience with Real World Testing
Selenium Testing
TechTalk: Report Bugs Like a Boss
Webinar: Appium & Perfecto: A Perfect Match
Qtp 8.0 basic
How to Test on the Right Mobile Platforms
QTP Automation Testing Tutorial 2
TechTalk: Taking the Mystery Out of Object ID Automation
Ad

Similar to Selenium (1) (20)

PPT
Selenium Introduction
PPT
Selenium
DOC
PPTX
Selenium – testing tool jack
PPT
Selenium
PPTX
Test automation using selenium
PPT
QSpiders - Automation using Selenium
PPT
Selenium
PDF
First steps with selenium rc
PPTX
Selenium
PPT
Selenium
PPTX
Automated Web Testing With Selenium
PPTX
PDF
Selenium by using JAVA
PPT
Selenium Primer
PDF
Lesson_06_Software_and_Automation_Testing_Frameworks.pdf
PPTX
PPTX
DOC
Selenium Automation Using Ruby
PDF
Selenium Tutorial
Selenium Introduction
Selenium
Selenium – testing tool jack
Selenium
Test automation using selenium
QSpiders - Automation using Selenium
Selenium
First steps with selenium rc
Selenium
Selenium
Automated Web Testing With Selenium
Selenium by using JAVA
Selenium Primer
Lesson_06_Software_and_Automation_Testing_Frameworks.pdf
Selenium Automation Using Ruby
Selenium Tutorial

More from onlinemindq (7)

PPT
Selenium 2
PPT
Selenium (2)
PPT
Selenium (2)
PPTX
Selenium.ppt
PPT
Selenium 2
PPT
A Buffer's Guide to Selenium 2
PPTX
Selenium Open Source Tool
Selenium 2
Selenium (2)
Selenium (2)
Selenium.ppt
Selenium 2
A Buffer's Guide to Selenium 2
Selenium Open Source Tool

Recently uploaded (20)

PDF
Insiders guide to clinical Medicine.pdf
PPTX
Cell Types and Its function , kingdom of life
PPTX
Renaissance Architecture: A Journey from Faith to Humanism
PDF
O7-L3 Supply Chain Operations - ICLT Program
PDF
Computing-Curriculum for Schools in Ghana
PPTX
Lesson notes of climatology university.
PPTX
human mycosis Human fungal infections are called human mycosis..pptx
PDF
Anesthesia in Laparoscopic Surgery in India
PDF
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
PPTX
BOWEL ELIMINATION FACTORS AFFECTING AND TYPES
PDF
Pre independence Education in Inndia.pdf
PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
PDF
01-Introduction-to-Information-Management.pdf
PDF
Classroom Observation Tools for Teachers
PDF
Module 4: Burden of Disease Tutorial Slides S2 2025
PPTX
master seminar digital applications in india
PDF
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
PDF
RMMM.pdf make it easy to upload and study
PDF
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
Insiders guide to clinical Medicine.pdf
Cell Types and Its function , kingdom of life
Renaissance Architecture: A Journey from Faith to Humanism
O7-L3 Supply Chain Operations - ICLT Program
Computing-Curriculum for Schools in Ghana
Lesson notes of climatology university.
human mycosis Human fungal infections are called human mycosis..pptx
Anesthesia in Laparoscopic Surgery in India
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
BOWEL ELIMINATION FACTORS AFFECTING AND TYPES
Pre independence Education in Inndia.pdf
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
STATICS OF THE RIGID BODIES Hibbelers.pdf
01-Introduction-to-Information-Management.pdf
Classroom Observation Tools for Teachers
Module 4: Burden of Disease Tutorial Slides S2 2025
master seminar digital applications in india
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
RMMM.pdf make it easy to upload and study
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf

Selenium (1)

  • 1. Selenium – Testing Tool Seleniumonlinetraining.info
  • 2. What is Selenium? • Selenium is a robust set of tools that supports rapid development of test automation for web-based applications. • Works anywhere JavaScript is supported • Hooks for many other languages - Java, Ruby, Python • Can simulate a user navigating through pages and then assert for specific marks on the pages • All you need to really know is HTML to start using it right awayseleniumonlinetraining.info
  • 3. Selenium • You can use open source - Selenium tool • Selenium IDE is a plug-in to Firefox to record and playback tests (like WinRunner, QTP). • You can then export the recorded test in most language e.g. HTML, Java , .NET , Perl , Ruby etc. • The exported test can be run in any browser and any platform using "selenium remote control". seleniumonlinetraining.info
  • 4. Where to get it? • You can use Selenium-Core and customize everything – deprecated. • But it is easier to just get a Firefox plug-in “Selenium-IDE” that helps you “record” test Cases. • You can record how an app is being used and then playback those recordings followed by asserts. • Get everything at:www.seleniumonlinetraining.info seleniumonlinetraining.info
  • 6. Selenium-IDE • Integrated Development Environment for building Selenium test cases. • Operates as a Firefox add-on and provides an interface for developing and running individual test cases or entire test suites. • Selenium-IDE has a recording feature, which will keep account of user actions as they are performed and store them as a reusable script to play back. • It also has a context menu (right-click) integrated with the Firefox browser, which allows the user to pick from a list of assertions and verifications for the selected location. • Offers full editing of test cases. • Although it is a Firefox only add-on, tests created in it can also be run against other browsers by using Selenium-RC & specifying the name of the test suite on the command line.
  • 7. Selenium-RC (Remote Control) • Selenium-RC provides an API (Application Programming Interface) and library for each of its supported languages: HTML, Java, C#, Perl, PHP, Python, and Ruby. • This ability to use Selenium-RC with a high-level programming language to develop test cases also allows the automated testing to be integrated with a project’s automated build environment. seleniumonlinetraining.info
  • 8. Selenium-Grid Selenium-Grid allows the Selenium-RC solution to scale for test suites or test suites to be run in multiple environments. • With Selenium-Grid multiple instances of Selenium-RC are running on various operating system and browser configurations, each of these when launching register with a hub. When tests are sent to the hub they are then redirected to an available Selenium-RC, which will launch the browser and run the test. • This allows for running tests in parallel, with the entire test suite theoretically taking only as long to run as the longest individual test.
  • 9. Steps to start with Selenium! 1) Begin: write and run tests in Firefox. Selenium IDE is a Firefox add-on that records clicks, typing, and other actions to make a test, which you can play back in the browser. 2) Customize: your language, your browser. Selenium Remote Control (RC) runs your tests in multiple browsers and platforms. Tweak your tests in your preferred language. 3) Deploy: scale out, speed up Selenium Grid extends Selenium RC to distribute your tests across multiple servers, saving you time by running tests in parallel. seleniumonlinetraining.info
  • 10. Browser Selenium-IDE Selenium-RC Operating Systems Firefox 3 1.0 Beta-1 & 1.0 Beta-2: Record and playback tests Start browser, run tests Windows, Linux, Mac Firefox 2 1.0 Beta-1: Record and playback tests Start browser, run tests Windows, Linux, Mac IE 8 Under development Windows IE 7 Test execution only via Selenium-RC Start browser, run tests Windows Safari 3 Test execution only via Selenium-RC Start browser, run tests Mac Safari 2 Test execution only via Selenium-RC Start browser, run tests Mac Opera 9 Test execution only via Selenium-RC Start browser, run tests Windows, Linux, Mac Opera 8 Test execution only via Selenium-RC Start browser, run tests Windows, Linux, Mac Google Chrome Test execution only via Selenium-RC(Windows) Start browser, run tests Windows Others Test execution only via Selenium-RC Partial support possible As applicable Supported Browsers * Tests developed on Firefox via Selenium-IDE can be executed on any other supported browser via a simple Selenium-RC command line. seleniumonlinetraining.info
  • 11. Selenium Commands – Selenese 1) Actions are commands that generally manipulate the state of the application. They do things like “click this link” and “select that option”. • Can be called with “AndWait” suffix, e.g. “clickAndWait”. 2) Accessors examine the state of the application and store the results in variables, e.g. “storeTitle”. • They are also used to automatically generate Assertions. 3) Assertions are like Accessors, but verify that the state of the application conforms to what is expected. Eg. “make sure the page title is X”, “verify that this checkbox is checked”. • All Selenium Assertions can be used in 3 modes: “assert”, “verify”, and ” waitFor”. For example, you can “assertText”, “verifyText” and “waitForText”. seleniumonlinetraining.info
  • 12. Selenium IDE The list of actions in the actual test case to execute The root of web application you want to test The log of the events that were executed, including any errors or warning that may have occurred
  • 13. Selenium IDE Execution Commands Record test actions Try the test in the Web based TestRunner Specify commands, including asserts Reference of the currently selected command seleniumonlinetraining.info
  • 14. Test Suite Execution Control Test Cases Steps of the test case Application being tested
  • 16. TestRunner Control Pause/Play Execution Step through Execution Control Speed of Execution Summary of the Test View the log of the current execution View the DOM of the current Page being tested Highlight Elements in the Execution Run All Tests Run Selected Test www.Seleniumonlinetraining.info
  • 17. Test Creation Demo in http://test.roosterit.com/ www.Seleniumonlinetraining.info
  • 18. Login to http://test.roosterit.com/ Click on Tools || Selenium IDE www.Swww.Sewww.Seleniumonli
  • 19. Selenium IDE in recording Mode www.Seleniumonlinetraining.info Wseleniumonlinetraining.infoww.S
  • 23. Selenium IDE records the Test Steps Stop Recording sss
  • 25. Make the required changes to the Test Case change Click to clickAndWait command s
  • 26. Make the required changes to the Test Case – change the email id in the second parameter Make other changes s
  • 27. Second Test Case: searchConsultant 1) Record 2) Stop Recording 3) Save with a Name 4) Make Required Changes to parameters or Commands 5) Play
  • 28. Run the entire Test Suite/Each Test Case See RESULT Here
  • 29. Test Suite on Firefox www.Seleniumonlinetrasselenium -ssssssssining.info
  • 33. Test Case Saved in HTML Tabular Format www.Swww.Seleniumonlinetrainin g.info
  • 34. Creating a Test Suite A Test Suite in Selenium is just an HTML file that contains a table of links to tests <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta content="text/html; charset=UTF-8" http-equiv="content-type" /> <title>Test Suite</title> </head> <body> <table id="suiteTable" cellpadding="1" cellspacing="1" border="1" class="selenium"> <tbody> <tr><td><b>Test Suite</b></td></tr> <tr><td><a href="addConsultant.html">addConsultant</a></td></tr> <tr><td><a href="searchConsultant">searchConsultant</a></td></tr> </tbody> </table> </body> </html> www.Seleniumonlinetraining.info
  • 35. TestRunner Demo Execute Tests created inside the Firefox TestRunner. www.Seleniumonlinetraining.info
  • 37. searchConsultant in Execution Mode - TestRunner www.Seleniumonlinetraining.info

Editor's Notes

  • #2: seleniumonlinetraining.info seleniumonlinetraining.info
  • #8: Selenium-RC allows the test automation developer to use a programming language for maximum flexibility and extensibility in developing test logic. For instance, if the application under test returns a result set, and if the automated test program needs to run tests on each element in the result set, the programming language’s iteration support can be used to iterate through the result set, calling Selenium commands to run tests on each item. seleniumonlinetraining.info seleniumonlinetraining.info