SlideShare une entreprise Scribd logo
1  sur  44
Brief History of The Selenium
Project
• Selenium first came to life in 2004 when Jason Huggins was
testing an internal application at ThoughtWorks Originally
named JavaScript Functional Tester [JSFT]
• He developed a Javascript library that could drive interactions
with the page, allowing him to automatically rerun tests
against multiple browsers
• While Selenium was a tremendous tool, it wasn’t without its
drawbacks, because of its Javascript based automation engine
and the security limitations browsers apply to Javascript,
different things became impossible to do
Manual
Testing !
I am
gonna
automate
tests!
• In 2006 a plucky engineer at Google named Simon Stewart
started work on a project he called WebDriver
• Simon wanted a testing tool that spoke directly to the browser
using the ‘native’ method for the browser and operating system,
thus avoiding the restrictions of a sandboxed Javascript
environment
• The WebDriver project began with the aim to solve the
Selenium’ pain-points
• In 2008 Selenium and WebDriver were merged
I am gonna find a
way !
• “Why are the projects merging? Partly because webdriver
addresses some shortcomings in selenium (by being able to
bypass the JS sandbox, for example. And we’ve got a
gorgeous API), partly because selenium addresses some
shortcomings in webdriver (such as supporting a broader
range of browsers) and partly because the main selenium
contributors and I felt that it was the best way to offer
users the best possible framework.”
• ~Simon Stewart
Introducing Selenium
• Selenium is a set of different software tools each with a different
approach to supporting test automation
• The entire suite of tools results in a rich set of testing functions
specifically geared to the needs of testing of web applications of all
types
• These operations are highly flexible, allowing many options for
locating UI elements and comparing expected test results against
actual application behavior
• One of Selenium’s key features is the support for executing one’s
tests on multiple browser platforms
SELENIUM TOOL SUITE
• Selenium IDE
• Selenium RC or Remote Control
• Selenium Grid
• Selenium2
Selenium is composed of multiple software tools. Each
has a specific role
• Selenium 2 (Selenium Webdriver):
• This brand new automation tool provides all sorts of awesome
features, including a more cohesive and object oriented API as
well as an answer to the limitations of the old implementation
• It supports the WebDriver API and underlying technology, along
with the Selenium 1 technology underneath the WebDriver API
for maximum flexibility in porting your tests
• In addition, Selenium 2 still runs Selenium 1’s Selenium RC
interface for backwards compatibility
• Selenium 1 (Selenium RC or Remote Control):
• Selenium RC was the main Selenium project for a long time,
before the WebDriver/Selenium merge brought up Selenium 2,
the newest and more powerful tool
• Selenium-Grid :
• It allows the Selenium RC solution to scale for large test
suites and for test suites that must be run in multiple
environments
• Selenium Grid allows you to run your tests in parallel, that is,
different tests can be run at the same time on different remote
machines
• This has two advantages. First, if you have a large test suite,
or a slow-running test suite, you can boost its performance
substantially by using Selenium Grid to divide your test suite
to run different tests at the same time using those different
machines
• Also, if you must run your test suite on multiple environments
you can have different remote machines supporting and
running your tests in them at the same time
• In each case Selenium Grid greatly improves the time it takes
to run your suite by making use of parallel processing
• Selenium IDE(Integrated Development Environment) is a
prototyping tool for building test scripts also known as record
and replay!
Selenium IDE
 Selenium IDE (SIDE) is a complete Integrated Development
Environment (IDE) for building Selenium test case.
 Firefox add-on that makes it easy to record, edit, and
debug tests.
 Provides an easy-to-use interface for developing and
running individual test cases or entire test suites.
 Can be used to generate code to run the tests with
Selenium Remote Control (RC).
11
Step 1: Is Selenium IDE Installed?
 Open the Firefox browser window (*1)
 Go to Tools Check whether Selenium IDE already exist
there (*2)
 If you see “Selenium IDE” then you already having
Selenium IDE plug-in installed in Firefox browser.
 If not installed then follow the instruction on the next slide
12
*1
Check whether
Selenium IDE is
already installed
*2
Step 1a: Installing Selenium IDE
13
Or you can find Selenium IDE
downloads in Previous Releases directory:
1. Previous
Releases
2. Selenium
IDE
3. Version
1.0.10
Step 1a: Installing Selenium IDE
In the Firefox browser go to Tools and verify whether
“Selenium IDE” is displayed.
Congratulation!
Selenium IDE installation is completed.
14
Selenium IDE is
successfully installed
15
Test Case #1: Login
Test-Case Objective:
Ensure Valid User
Login
Expected Result:
1. OrangeHRM index
page is loaded
2. Correct username is
displayed as part of
the greeting.
“Welcome Admin” 16
Steps :
1.In the login textbox
type “admin”.
2.In the password
textbox type
“password”.
3.Click “Submit”
button
4.Verify that a correct
user name is
displayed
Test Script #1: Login
Test Script Steps:
Open OrangeHRM application in Firefox
http://hrm.portnov.com
Login using :
Login Name: admin
Password: password
Click Login button
Highlight “Welcome Admin” text
Right-click and select VerifyTextPresent
Click logout link
17
Recording An Automated Test
1. Open OrangeHRM application in Firefox
http://hrm.portnov.com (*1)
2. Open Selenium IDE in Firefox
Go to Tools Selenium IDE (*2)
18
*2*1
The Record
button is ON by
default
Login Test
Make sure Record button is ON!
Go to the Browser window
Login using (*2):
Login Name: admin
Password: password
Click Login button
19
*1
*2
The Record button is
ON by default
Login Name: admin
Password: password
Then click Login button
Login Test
Highlight “Welcome Admin” text (*1)
Right-click and select VerifyTextPresent (*2)
Click logout link
20
*1
*2
Highlight “Welcome
demo”
Select
VerifyTextPresent
Stop Recording
Go to Selenium IDE
Click the red button to STOP recording
All your actions are recorded and displayed
sequentially under Command Table Tab
21
Click here to Stop
recording
What did we accomplish?
Manual Test-Case
Test-Case Objective
Ensure Valid User Login
Steps
 In the login textbox type
admin.
 In the password textbox
type password.
 Click Submit button
 Verify that a correct user
name is displayed
 Logout
Expected Result
1) OrangeHRM index page is
loaded
2) Correct username is
displayed as part of the
greeting.
“Welcome Admin”
Automated Test-Case 22
We created our first automated test script
Running Selenium Automated Test
Make sure the Firefox browser is still open
Go to Selenium IDE and click “Play current test
case” button
23
*1 *2
Click to play
the Test Case
Make the test case
playback in slow mode
Debugging
Examine the result of the script.
24
Time is needed to validate the login
information…
The test must WAIT for the next web page to
load before proceeding.
What went
wrong?
Debugging Tips
Open Selenium IDE through Tools menu,
otherwise the IDE may freeze and act
unpredictably.
Make sure you substitute click command
with clickAndWait command wherever
needed.
25
Editing
Editing to add wait time to the script
1. Click the 3rd to last row where ClickA
command is located
2. Modify the command field
 Replace “click” with “clickAndWait”
command
3. Re-play the test…
26
Click this row
Select clickAndWait
command
Helpful Notes:
One Firefox browser window must be open.
Multiple browser windows will confuse Selenium.
Play back every automated test to ensure
expected behavior.
Keep playback in slow mode when debugging.
Placing Browser window and Selenium IDE
windows side by side is a convenient way of
tracking test execution step by step.
27
Pros:
• Very easy to use
• Test case can be recorded once easily and can
be run any number of times
• Test case can be exported in any language
Cons:
• Supports only Firefox Browser
• Does not support advanced versions of any
browser
PROS AND CONS OF
SELENIUM IDE
SUPPORTED OPERATING
SYSTEMS
• Windows
• Linux
• Solaris
• OS X
• Android (with Selendroid or appium)
• iOS (with ios-driver or appium)
SUPPORTED WEB BROWSERS
• Google Chrome
• Internet Explorer 6, 7, 8, 9, 10 - 32 and 64-bit
where applicable
• Firefox: latest ESR, previous ESR, current release,
one previous release
• Safari
• Opera
• HtmlUnit
• phantomjs
SUPPORTED PROGRAMMING
LANGUAGES
• Java
• C#
• Ruby
• Python
• PHP
• Perl
OUTPUT
Why migrate to selenium2 from ide or rc?
• Selenium2 supports almost all operating system- Windows, Linux,
OS X, Solaris unlike IDE
• Selenium2 supports almost all web browsers- IE, Firefox , Chrome,
Opera, Safari unlike IDE
• Selenium2 supports all major languages- Java, C#, Ruby, Python,
Perl, PHP unlike IDE
• Selenium doesn’t need to start and stop server at the start and
end of the process unlike RC
• Selenium2 supports rich API’s for the advanced versions of web
browsers unlike rc and ide
• Selenium2 also supports Android and IOS platforms unlike rc and
ide
• Selenium2 can perform mouse movements using web driver unlike
Rc and IDe
• Selenium2 directly talks to the browser unlike rc and ide
Selenium- A Software Testing Tool

Contenu connexe

Tendances

What Is Selenium? | Selenium Basics For Beginners | Introduction To Selenium ...
What Is Selenium? | Selenium Basics For Beginners | Introduction To Selenium ...What Is Selenium? | Selenium Basics For Beginners | Introduction To Selenium ...
What Is Selenium? | Selenium Basics For Beginners | Introduction To Selenium ...
Simplilearn
 

Tendances (20)

Automation Testing by Selenium Web Driver
Automation Testing by Selenium Web DriverAutomation Testing by Selenium Web Driver
Automation Testing by Selenium Web Driver
 
Introduction to Selenium Web Driver
Introduction to Selenium Web DriverIntroduction to Selenium Web Driver
Introduction to Selenium Web Driver
 
Selenium
SeleniumSelenium
Selenium
 
SELENIUM PPT.pdf
SELENIUM PPT.pdfSELENIUM PPT.pdf
SELENIUM PPT.pdf
 
Selenium Automation Framework
Selenium Automation  FrameworkSelenium Automation  Framework
Selenium Automation Framework
 
Selenium WebDriver
Selenium WebDriverSelenium WebDriver
Selenium WebDriver
 
An overview of selenium webdriver
An overview of selenium webdriverAn overview of selenium webdriver
An overview of selenium webdriver
 
Selenium
SeleniumSelenium
Selenium
 
Selenium Maven With Eclipse | Edureka
Selenium Maven With Eclipse | EdurekaSelenium Maven With Eclipse | Edureka
Selenium Maven With Eclipse | Edureka
 
Selenium
SeleniumSelenium
Selenium
 
Web application testing with Selenium
Web application testing with SeleniumWeb application testing with Selenium
Web application testing with Selenium
 
Automation Testing using Selenium Webdriver
Automation Testing using Selenium WebdriverAutomation Testing using Selenium Webdriver
Automation Testing using Selenium Webdriver
 
Selenium ppt
Selenium pptSelenium ppt
Selenium ppt
 
Selenium - Introduction
Selenium - IntroductionSelenium - Introduction
Selenium - Introduction
 
Introduction to selenium
Introduction to seleniumIntroduction to selenium
Introduction to selenium
 
Selenium introduction
Selenium introductionSelenium introduction
Selenium introduction
 
Selenium WebDriver training
Selenium WebDriver trainingSelenium WebDriver training
Selenium WebDriver training
 
What Is Selenium? | Selenium Basics For Beginners | Introduction To Selenium ...
What Is Selenium? | Selenium Basics For Beginners | Introduction To Selenium ...What Is Selenium? | Selenium Basics For Beginners | Introduction To Selenium ...
What Is Selenium? | Selenium Basics For Beginners | Introduction To Selenium ...
 
Selenium
SeleniumSelenium
Selenium
 
Setting up Page Object Model in Automation Framework
Setting up Page Object Model in Automation FrameworkSetting up Page Object Model in Automation Framework
Setting up Page Object Model in Automation Framework
 

En vedette

Qtp 8.0 basic
Qtp 8.0 basicQtp 8.0 basic
Qtp 8.0 basic
medsherb
 
Hp perfecto webinar - UFT Mobile
Hp perfecto webinar - UFT MobileHp perfecto webinar - UFT Mobile
Hp perfecto webinar - UFT Mobile
Perfecto Mobile
 

En vedette (20)

Ten reasons why now is the perfect time to get serious about the mobile web
Ten reasons why now is the perfect time to get serious about the mobile webTen reasons why now is the perfect time to get serious about the mobile web
Ten reasons why now is the perfect time to get serious about the mobile web
 
How to Test on the Right Mobile Platforms
How to Test on the Right Mobile PlatformsHow to Test on the Right Mobile Platforms
How to Test on the Right Mobile Platforms
 
Achieving a Winning Digital User Experience with Real World Testing
Achieving a Winning Digital User Experience with Real World TestingAchieving a Winning Digital User Experience with Real World Testing
Achieving a Winning Digital User Experience with Real World Testing
 
Webinar: Appium & Perfecto: A Perfect Match
Webinar: Appium & Perfecto: A Perfect MatchWebinar: Appium & Perfecto: A Perfect Match
Webinar: Appium & Perfecto: A Perfect Match
 
TechTalk: Report Bugs Like a Boss
TechTalk: Report Bugs Like a BossTechTalk: Report Bugs Like a Boss
TechTalk: Report Bugs Like a Boss
 
Qtp 80 Basics3561
Qtp 80 Basics3561Qtp 80 Basics3561
Qtp 80 Basics3561
 
Selenium Testing
Selenium Testing Selenium Testing
Selenium Testing
 
Qtp 8.0 basic
Qtp 8.0 basicQtp 8.0 basic
Qtp 8.0 basic
 
Qtp day 1
Qtp day 1Qtp day 1
Qtp day 1
 
QTP Automation Testing Tutorial 2
QTP Automation Testing Tutorial 2QTP Automation Testing Tutorial 2
QTP Automation Testing Tutorial 2
 
TechTalk: Taking the Mystery Out of Object ID Automation
TechTalk: Taking the Mystery Out of Object ID AutomationTechTalk: Taking the Mystery Out of Object ID Automation
TechTalk: Taking the Mystery Out of Object ID Automation
 
Hp perfecto webinar - UFT Mobile
Hp perfecto webinar - UFT MobileHp perfecto webinar - UFT Mobile
Hp perfecto webinar - UFT Mobile
 
Qtp object repository
Qtp object repositoryQtp object repository
Qtp object repository
 
10 reasons why now is the perfect time to get started with the mobile web
10 reasons why now is the perfect time to get started with the mobile web10 reasons why now is the perfect time to get started with the mobile web
10 reasons why now is the perfect time to get started with the mobile web
 
Test Automation Tool comparison – HP UFT/QTP vs. Selenium
Test Automation Tool comparison –  HP UFT/QTP vs. SeleniumTest Automation Tool comparison –  HP UFT/QTP vs. Selenium
Test Automation Tool comparison – HP UFT/QTP vs. Selenium
 
Launch Better Apps, Faster - Perfecto & Orasi Joint Webinar Sldies
Launch Better Apps, Faster - Perfecto & Orasi Joint Webinar SldiesLaunch Better Apps, Faster - Perfecto & Orasi Joint Webinar Sldies
Launch Better Apps, Faster - Perfecto & Orasi Joint Webinar Sldies
 
Testing Apps for Wearables
Testing Apps for WearablesTesting Apps for Wearables
Testing Apps for Wearables
 
iOS9 Launch - Mobile Dev & Test Implications
iOS9 Launch - Mobile Dev & Test ImplicationsiOS9 Launch - Mobile Dev & Test Implications
iOS9 Launch - Mobile Dev & Test Implications
 
7 Keys for Unattended Test AUtomation webinar deck
7 Keys for Unattended Test AUtomation webinar deck7 Keys for Unattended Test AUtomation webinar deck
7 Keys for Unattended Test AUtomation webinar deck
 
Appium vs. Appium with Perfecto
Appium vs. Appium with PerfectoAppium vs. Appium with Perfecto
Appium vs. Appium with Perfecto
 

Similaire à Selenium- A Software Testing Tool

Selenium Tutorial
Selenium TutorialSelenium Tutorial
Selenium Tutorial
prad_123
 
Selenium IDE Tutorial For Beginners | Selenium IDE Tutorial | What Is Seleniu...
Selenium IDE Tutorial For Beginners | Selenium IDE Tutorial | What Is Seleniu...Selenium IDE Tutorial For Beginners | Selenium IDE Tutorial | What Is Seleniu...
Selenium IDE Tutorial For Beginners | Selenium IDE Tutorial | What Is Seleniu...
Simplilearn
 
Test Automation Using Selenium
Test Automation Using SeleniumTest Automation Using Selenium
Test Automation Using Selenium
Nikhil Kapoor
 

Similaire à Selenium- A Software Testing Tool (20)

Selenium
SeleniumSelenium
Selenium
 
Selenium
SeleniumSelenium
Selenium
 
Learn Selenium - Online Guide
Learn Selenium - Online GuideLearn Selenium - Online Guide
Learn Selenium - Online Guide
 
Selenium By Pravin Mishra
Selenium By Pravin MishraSelenium By Pravin Mishra
Selenium By Pravin Mishra
 
Selenium
SeleniumSelenium
Selenium
 
Automated ui-testing
Automated ui-testingAutomated ui-testing
Automated ui-testing
 
Selenium Introduction and IDE
Selenium Introduction and IDESelenium Introduction and IDE
Selenium Introduction and IDE
 
Selenium introduction
Selenium introductionSelenium introduction
Selenium introduction
 
Selenium Tutorial
Selenium TutorialSelenium Tutorial
Selenium Tutorial
 
Introduction to selenium
Introduction to seleniumIntroduction to selenium
Introduction to selenium
 
Selenium presentation
Selenium presentationSelenium presentation
Selenium presentation
 
Selenium IDE Tutorial For Beginners | Selenium IDE Tutorial | What Is Seleniu...
Selenium IDE Tutorial For Beginners | Selenium IDE Tutorial | What Is Seleniu...Selenium IDE Tutorial For Beginners | Selenium IDE Tutorial | What Is Seleniu...
Selenium IDE Tutorial For Beginners | Selenium IDE Tutorial | What Is Seleniu...
 
Selenium by using JAVA
Selenium by using JAVASelenium by using JAVA
Selenium by using JAVA
 
Test Automation Using Selenium
Test Automation Using SeleniumTest Automation Using Selenium
Test Automation Using Selenium
 
Automated Web Testing With Selenium
Automated Web Testing With SeleniumAutomated Web Testing With Selenium
Automated Web Testing With Selenium
 
selenium
selenium selenium
selenium
 
white and grey modern website application education project group school pres...
white and grey modern website application education project group school pres...white and grey modern website application education project group school pres...
white and grey modern website application education project group school pres...
 
What is Selenium Introduction to Selenium Testing.pptx
What is Selenium Introduction to Selenium Testing.pptxWhat is Selenium Introduction to Selenium Testing.pptx
What is Selenium Introduction to Selenium Testing.pptx
 
What is selenium
What is seleniumWhat is selenium
What is selenium
 
BCS Selenium Workshop
BCS Selenium WorkshopBCS Selenium Workshop
BCS Selenium Workshop
 

Dernier

%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
masabamasaba
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
masabamasaba
 
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Medical / Health Care (+971588192166) Mifepristone and Misoprostol tablets 200mg
 

Dernier (20)

WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
 
WSO2Con204 - Hard Rock Presentation - Keynote
WSO2Con204 - Hard Rock Presentation - KeynoteWSO2Con204 - Hard Rock Presentation - Keynote
WSO2Con204 - Hard Rock Presentation - Keynote
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
 
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
 
WSO2CON 2024 - How to Run a Security Program
WSO2CON 2024 - How to Run a Security ProgramWSO2CON 2024 - How to Run a Security Program
WSO2CON 2024 - How to Run a Security Program
 
WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
 

Selenium- A Software Testing Tool

  • 1.
  • 2. Brief History of The Selenium Project • Selenium first came to life in 2004 when Jason Huggins was testing an internal application at ThoughtWorks Originally named JavaScript Functional Tester [JSFT] • He developed a Javascript library that could drive interactions with the page, allowing him to automatically rerun tests against multiple browsers • While Selenium was a tremendous tool, it wasn’t without its drawbacks, because of its Javascript based automation engine and the security limitations browsers apply to Javascript, different things became impossible to do Manual Testing ! I am gonna automate tests!
  • 3. • In 2006 a plucky engineer at Google named Simon Stewart started work on a project he called WebDriver • Simon wanted a testing tool that spoke directly to the browser using the ‘native’ method for the browser and operating system, thus avoiding the restrictions of a sandboxed Javascript environment • The WebDriver project began with the aim to solve the Selenium’ pain-points • In 2008 Selenium and WebDriver were merged I am gonna find a way !
  • 4. • “Why are the projects merging? Partly because webdriver addresses some shortcomings in selenium (by being able to bypass the JS sandbox, for example. And we’ve got a gorgeous API), partly because selenium addresses some shortcomings in webdriver (such as supporting a broader range of browsers) and partly because the main selenium contributors and I felt that it was the best way to offer users the best possible framework.” • ~Simon Stewart
  • 5.
  • 6. Introducing Selenium • Selenium is a set of different software tools each with a different approach to supporting test automation • The entire suite of tools results in a rich set of testing functions specifically geared to the needs of testing of web applications of all types • These operations are highly flexible, allowing many options for locating UI elements and comparing expected test results against actual application behavior • One of Selenium’s key features is the support for executing one’s tests on multiple browser platforms
  • 7. SELENIUM TOOL SUITE • Selenium IDE • Selenium RC or Remote Control • Selenium Grid • Selenium2
  • 8. Selenium is composed of multiple software tools. Each has a specific role • Selenium 2 (Selenium Webdriver): • This brand new automation tool provides all sorts of awesome features, including a more cohesive and object oriented API as well as an answer to the limitations of the old implementation • It supports the WebDriver API and underlying technology, along with the Selenium 1 technology underneath the WebDriver API for maximum flexibility in porting your tests • In addition, Selenium 2 still runs Selenium 1’s Selenium RC interface for backwards compatibility • Selenium 1 (Selenium RC or Remote Control): • Selenium RC was the main Selenium project for a long time, before the WebDriver/Selenium merge brought up Selenium 2, the newest and more powerful tool
  • 9. • Selenium-Grid : • It allows the Selenium RC solution to scale for large test suites and for test suites that must be run in multiple environments • Selenium Grid allows you to run your tests in parallel, that is, different tests can be run at the same time on different remote machines • This has two advantages. First, if you have a large test suite, or a slow-running test suite, you can boost its performance substantially by using Selenium Grid to divide your test suite to run different tests at the same time using those different machines • Also, if you must run your test suite on multiple environments you can have different remote machines supporting and running your tests in them at the same time • In each case Selenium Grid greatly improves the time it takes to run your suite by making use of parallel processing • Selenium IDE(Integrated Development Environment) is a prototyping tool for building test scripts also known as record and replay!
  • 10.
  • 11. Selenium IDE  Selenium IDE (SIDE) is a complete Integrated Development Environment (IDE) for building Selenium test case.  Firefox add-on that makes it easy to record, edit, and debug tests.  Provides an easy-to-use interface for developing and running individual test cases or entire test suites.  Can be used to generate code to run the tests with Selenium Remote Control (RC). 11
  • 12. Step 1: Is Selenium IDE Installed?  Open the Firefox browser window (*1)  Go to Tools Check whether Selenium IDE already exist there (*2)  If you see “Selenium IDE” then you already having Selenium IDE plug-in installed in Firefox browser.  If not installed then follow the instruction on the next slide 12 *1 Check whether Selenium IDE is already installed *2
  • 13. Step 1a: Installing Selenium IDE 13 Or you can find Selenium IDE downloads in Previous Releases directory: 1. Previous Releases 2. Selenium IDE 3. Version 1.0.10
  • 14. Step 1a: Installing Selenium IDE In the Firefox browser go to Tools and verify whether “Selenium IDE” is displayed. Congratulation! Selenium IDE installation is completed. 14 Selenium IDE is successfully installed
  • 15. 15
  • 16. Test Case #1: Login Test-Case Objective: Ensure Valid User Login Expected Result: 1. OrangeHRM index page is loaded 2. Correct username is displayed as part of the greeting. “Welcome Admin” 16 Steps : 1.In the login textbox type “admin”. 2.In the password textbox type “password”. 3.Click “Submit” button 4.Verify that a correct user name is displayed
  • 17. Test Script #1: Login Test Script Steps: Open OrangeHRM application in Firefox http://hrm.portnov.com Login using : Login Name: admin Password: password Click Login button Highlight “Welcome Admin” text Right-click and select VerifyTextPresent Click logout link 17
  • 18. Recording An Automated Test 1. Open OrangeHRM application in Firefox http://hrm.portnov.com (*1) 2. Open Selenium IDE in Firefox Go to Tools Selenium IDE (*2) 18 *2*1 The Record button is ON by default
  • 19. Login Test Make sure Record button is ON! Go to the Browser window Login using (*2): Login Name: admin Password: password Click Login button 19 *1 *2 The Record button is ON by default Login Name: admin Password: password Then click Login button
  • 20. Login Test Highlight “Welcome Admin” text (*1) Right-click and select VerifyTextPresent (*2) Click logout link 20 *1 *2 Highlight “Welcome demo” Select VerifyTextPresent
  • 21. Stop Recording Go to Selenium IDE Click the red button to STOP recording All your actions are recorded and displayed sequentially under Command Table Tab 21 Click here to Stop recording
  • 22. What did we accomplish? Manual Test-Case Test-Case Objective Ensure Valid User Login Steps  In the login textbox type admin.  In the password textbox type password.  Click Submit button  Verify that a correct user name is displayed  Logout Expected Result 1) OrangeHRM index page is loaded 2) Correct username is displayed as part of the greeting. “Welcome Admin” Automated Test-Case 22 We created our first automated test script
  • 23. Running Selenium Automated Test Make sure the Firefox browser is still open Go to Selenium IDE and click “Play current test case” button 23 *1 *2 Click to play the Test Case Make the test case playback in slow mode
  • 24. Debugging Examine the result of the script. 24 Time is needed to validate the login information… The test must WAIT for the next web page to load before proceeding. What went wrong?
  • 25. Debugging Tips Open Selenium IDE through Tools menu, otherwise the IDE may freeze and act unpredictably. Make sure you substitute click command with clickAndWait command wherever needed. 25
  • 26. Editing Editing to add wait time to the script 1. Click the 3rd to last row where ClickA command is located 2. Modify the command field  Replace “click” with “clickAndWait” command 3. Re-play the test… 26 Click this row Select clickAndWait command
  • 27. Helpful Notes: One Firefox browser window must be open. Multiple browser windows will confuse Selenium. Play back every automated test to ensure expected behavior. Keep playback in slow mode when debugging. Placing Browser window and Selenium IDE windows side by side is a convenient way of tracking test execution step by step. 27
  • 28. Pros: • Very easy to use • Test case can be recorded once easily and can be run any number of times • Test case can be exported in any language Cons: • Supports only Firefox Browser • Does not support advanced versions of any browser PROS AND CONS OF SELENIUM IDE
  • 29.
  • 30. SUPPORTED OPERATING SYSTEMS • Windows • Linux • Solaris • OS X • Android (with Selendroid or appium) • iOS (with ios-driver or appium)
  • 31. SUPPORTED WEB BROWSERS • Google Chrome • Internet Explorer 6, 7, 8, 9, 10 - 32 and 64-bit where applicable • Firefox: latest ESR, previous ESR, current release, one previous release • Safari • Opera • HtmlUnit • phantomjs
  • 32. SUPPORTED PROGRAMMING LANGUAGES • Java • C# • Ruby • Python • PHP • Perl
  • 33.
  • 34.
  • 35.
  • 36.
  • 37.
  • 38.
  • 39.
  • 40.
  • 42.
  • 43. Why migrate to selenium2 from ide or rc? • Selenium2 supports almost all operating system- Windows, Linux, OS X, Solaris unlike IDE • Selenium2 supports almost all web browsers- IE, Firefox , Chrome, Opera, Safari unlike IDE • Selenium2 supports all major languages- Java, C#, Ruby, Python, Perl, PHP unlike IDE • Selenium doesn’t need to start and stop server at the start and end of the process unlike RC • Selenium2 supports rich API’s for the advanced versions of web browsers unlike rc and ide • Selenium2 also supports Android and IOS platforms unlike rc and ide • Selenium2 can perform mouse movements using web driver unlike Rc and IDe • Selenium2 directly talks to the browser unlike rc and ide