SlideShare a Scribd company logo
Automation using Selenium
www.mindqonline.com
Agenda
What is Selenium ?
• Selenium Components
• Advantages of Selenium
• Selenese-The language of Selenium
 Automating Tests using Selenium
• Prerequisites and Test Bed Setup
• Scripting Techniques and Best Practices
 Known Issues & Workarounds
 Benefits to Organization
 Drawbacks
 Selenium Reference on the Internet
• Source Repository
• Selenium User Forums
• Selenium Developer Forums
• Selenium-How to Contribute
www.mindqonline.com
What is Selenium ?
www.mindqonline.com
 Automation tool for web based applications
 Used for functional regression testing
 Uses JavaScript
 Embeds test automation engine in your browser
www.mindqonline.com
Selenium Components
1. Selenium Core
 Core engine of Selenium
 JavaScript/DHTML library
 Other Selenium components such as IDE and RC
build on it
 Supports a variety of platforms
 Windows: Internet Explorer 6.0 and 7.0 , FireFox 0.8 to 2.0
 Mac OS X: Safari 2.0.4+, FireFox 0.8 to 2.0 , Camino 1.0a1
 Linux: FireFox 0.8 to 2.0 Konqueror
www.mindqonline.com
Selenium Components
2. Selenium IDE
 Integrated development
environment for Selenium tests
 Enables you to record a browser
session
 Implemented as a Mozilla FireFox
extension
 Allows you to record, edit, and
debug tests.
www.mindqonline.com
Selenium Components..
3. Selenium Remote Control (RC)
 Provides Selenium Server
 Start/Stop/Control supported browsers
 Script web application UI tests
 Works with any HTTP website
 Uses any JavaScript enabled browser
www.mindqonline.com
How Selenium RC Works
www.mindqonline.com
Advantages of Selenium
 Open source, free software
 Easy Installation
 Scripting Techniques :
Easy recording and playback of scripts
Modular scripts
 Compatibility :
 Multiple operating systems (Windows, Linux, Mac)
 Allows cross browser testing (Record in FireFox, execute in IE)
 No dedicated machine required for test execution (user can
work in parallel).
 Integration with third party tools.
Example : RTH Test Case Management Tool.
www.mindqonline.com
Selenese-The language of Selenium
Selenese consists of Actions, Accessors, Element
Locators and Variables
• Actions - Commands for the selenese language to perform a
action on a web application
 Script performs a particular action
 Typically take element locator and possibly a value
 Examples :
1.Open- open a url
2.Click- click button, link, etc..
3.Type- type text in text field
www.mindqonline.com
Selenese-The language of
Selenium
• Accessors – Verification / Validation checkpoints for the tool
Data related
Take only element locators
Examples :
1. store(locator,variable)
2. verify(locator,pattern)
3.eval- return value of JS expression
4. bodyText-contents of HTML body
www.mindqonline.com
Selenese-The language of Selenium
• Element Locators
 These can be id, name, identifier, link, etc..
 Variables used in scripting
• Information regarding Actions, Accessors can be found in class
‘Selenium Driver’ in installed directory
For e.g. C:Seleniumselenium-remote-control-
0.9.0rubydocindex.html
www.mindqonline.com
Sample Script
require "selenium"
require "test/unit"
def test_new
@selenium.open "/"
@selenium.type "q", "Hello"
@selenium.click "btnG"
@selenium.wait_for_page_to_load "30000"
begin
assert @selenium.is_text_present("Hello is a new way to look at
pictures with friends and family. )
rescue Test::Unit::AssertionFailedError
@verification_errors << $!
end
temp = @selenium.get_text("//div[2]/div[1]")
end
end
www.mindqonline.com
Automating Tests using Selenium
www.mindqonline.com
 Software :
 Selenium IDE, Mozilla FireFox for script recording
 Selenium Server, Java for running scripts
 Configuration :
 Set path variables
 Use –multiWindow option while starting server
 Resource :
 Users… should have basic scripting knowledge
 Hardware… No specific requirement the basic configuration for a server –
P4, 512 MB RAM is good enough.
Prerequisites and Test Bed Setup
www.mindqonline.com
In order to ensure the quality of scripts and reduce
maintenance, it is best to have scripting techniques and best
practices. Some of which are…
 Comments and proper formatting in scripts
 Scripting considerations for integration with other tools
 Documentation of basic data required for scripts
 Documentation of new functions added for scripts
 Follow fixed, logical scripting format
 Include code to handle Selenium errors
 Scripting according to application specific issues
Scripting Techniques and Best Practices
www.mindqonline.com
Known Issues & Workarounds
www.mindqonline.com
Elements not found on page
Potential Causes :
 Can happen due to execution speed of Selenium
 Elements do not load on page in time
Fix :
 Add code in scripts which waits for elements
Additional issues :
 Sometimes existing elements on a page are not detected
 Sometimes elements on a page have a same label
Solution :
 Obtain exact element label from source code
 Label can be used in scripts for accuracy
www.mindqonline.com
Steps :
Window id required for automated operations in
window
At times if id is not obtained during recording, go to
window and perform operations
Window id will be obtained after this action.
Handling of Popup windows
www.mindqonline.com
Option :
 -multiWindow option handles potential frame problems
Causes :
 At times required name of frame not obtained in recording
Fix :
 Obtain frame label from source code
 Also can be obtained from browser URL bar
Handling of Frames
www.mindqonline.com
Benefits to Organization
www.mindqonline.com
 Automation Benefits :
 Usual benefits for automation e.g. Time saving
 Time required for sanity reduced ( 12 man hours to 3 man hours, build frequency of 4-
5 builds a month )
 For one of the projects, Sanity suite automated : 243 test cases
 Good Returns on Zero Investment
 Increasing Productivity
 Cost saving as it is open-source
 QA engineers get familiar with scripting languages like Ruby, Perl etc apart from
manual testing
 Caveat:
 Full automation and maintenance has not been evaluated and that can be a risk
Benefits to Organization
www.mindqonline.com
Drawbacks
 Lack of exhaustive formal guidance material
 Mozilla FireFox browser is required for script recording
 Only works with web based applications
www.mindqonline.com

More Related Content

What's hot

Web application testing with Selenium
Web application testing with SeleniumWeb application testing with Selenium
Web application testing with Selenium
Kerry Buckley
 
Selenium
SeleniumSelenium
Selenium
Batch2016
 
QSpiders - Automation using Selenium
QSpiders - Automation using SeleniumQSpiders - Automation using Selenium
QSpiders - Automation using Selenium
Qspiders - Software Testing Training Institute
 
Selenium Framework using Java | Selenium Tutorial | Selenium Training Online ...
Selenium Framework using Java | Selenium Tutorial | Selenium Training Online ...Selenium Framework using Java | Selenium Tutorial | Selenium Training Online ...
Selenium Framework using Java | Selenium Tutorial | Selenium Training Online ...
Edureka!
 
Selenium (1)
Selenium (1)Selenium (1)
Selenium (1)
onlinemindq
 
Python selenium
Python seleniumPython selenium
Python selenium
Ducat
 
Automated Web Testing With Selenium
Automated Web Testing With SeleniumAutomated Web Testing With Selenium
Automated Web Testing With Selenium
Deepak Mittal
 
Selenium institute in bangalore
Selenium institute in bangaloreSelenium institute in bangalore
Selenium institute in bangalore
TIB Academy
 
Selenium ppt
Selenium pptSelenium ppt
Selenium ppt
Aneesh Rangarajan
 
Selenium
SeleniumSelenium
Selenium
Kalyan ch
 
Selenium
SeleniumSelenium
Selenium
Adam Goucher
 
Test automation using selenium
Test automation using seleniumTest automation using selenium
Test automation using selenium
shreyas JC
 
Selenium IDE
Selenium IDESelenium IDE
Selenium IDE
b4usolution .
 
Selenium 2: The Future of Selenium is now!
Selenium 2: The Future of Selenium is now!Selenium 2: The Future of Selenium is now!
Selenium 2: The Future of Selenium is now!AutomatedTester
 
From IDE to Selenium 2
From IDE to Selenium 2From IDE to Selenium 2
From IDE to Selenium 2
davehunt82
 
Selenium test automation
Selenium test automationSelenium test automation
Selenium test automation
Srikanth Vuriti
 
Selenium Primer
Selenium PrimerSelenium Primer
Selenium Primer
Debashish Chakrabarty
 
Test Automation and Selenium
Test Automation and SeleniumTest Automation and Selenium
Test Automation and Selenium
Karapet Sarkisyan
 
Selenium WebDriver with C#
Selenium WebDriver with C#Selenium WebDriver with C#
Selenium WebDriver with C#
srivinayak
 

What's hot (20)

Web application testing with Selenium
Web application testing with SeleniumWeb application testing with Selenium
Web application testing with Selenium
 
Selenium
SeleniumSelenium
Selenium
 
QSpiders - Automation using Selenium
QSpiders - Automation using SeleniumQSpiders - Automation using Selenium
QSpiders - Automation using Selenium
 
Selenium Framework using Java | Selenium Tutorial | Selenium Training Online ...
Selenium Framework using Java | Selenium Tutorial | Selenium Training Online ...Selenium Framework using Java | Selenium Tutorial | Selenium Training Online ...
Selenium Framework using Java | Selenium Tutorial | Selenium Training Online ...
 
Selenium (1)
Selenium (1)Selenium (1)
Selenium (1)
 
Python selenium
Python seleniumPython selenium
Python selenium
 
Automated Web Testing With Selenium
Automated Web Testing With SeleniumAutomated Web Testing With Selenium
Automated Web Testing With Selenium
 
Selenium institute in bangalore
Selenium institute in bangaloreSelenium institute in bangalore
Selenium institute in bangalore
 
Selenium ppt
Selenium pptSelenium ppt
Selenium ppt
 
Selenium
SeleniumSelenium
Selenium
 
Selenium
SeleniumSelenium
Selenium
 
Test automation using selenium
Test automation using seleniumTest automation using selenium
Test automation using selenium
 
Selenium IDE
Selenium IDESelenium IDE
Selenium IDE
 
Selenium 2: The Future of Selenium is now!
Selenium 2: The Future of Selenium is now!Selenium 2: The Future of Selenium is now!
Selenium 2: The Future of Selenium is now!
 
From IDE to Selenium 2
From IDE to Selenium 2From IDE to Selenium 2
From IDE to Selenium 2
 
Selenium test automation
Selenium test automationSelenium test automation
Selenium test automation
 
Selenium Primer
Selenium PrimerSelenium Primer
Selenium Primer
 
Selenium Demo
Selenium DemoSelenium Demo
Selenium Demo
 
Test Automation and Selenium
Test Automation and SeleniumTest Automation and Selenium
Test Automation and Selenium
 
Selenium WebDriver with C#
Selenium WebDriver with C#Selenium WebDriver with C#
Selenium WebDriver with C#
 

Similar to Selenium rc ppt

Test_Automation using Selenium.ppt
Test_Automation using Selenium.pptTest_Automation using Selenium.ppt
Test_Automation using Selenium.ppt
SamKhan531862
 
Karate _Framework.ppt
Karate _Framework.pptKarate _Framework.ppt
Karate _Framework.ppt
SamKhan531862
 
Mastering Test Automation: How to Use Selenium Successfully
Mastering Test Automation: How to Use Selenium Successfully Mastering Test Automation: How to Use Selenium Successfully
Mastering Test Automation: How to Use Selenium Successfully
Applitools
 
How To Use Selenium Successfully (Java Edition)
How To Use Selenium Successfully (Java Edition)How To Use Selenium Successfully (Java Edition)
How To Use Selenium Successfully (Java Edition)
Sauce Labs
 
Selenium Tips & Tricks, presented at the Tel Aviv Selenium Meetup
Selenium Tips & Tricks, presented at the Tel Aviv Selenium MeetupSelenium Tips & Tricks, presented at the Tel Aviv Selenium Meetup
Selenium Tips & Tricks, presented at the Tel Aviv Selenium Meetup
Dave Haeffner
 
How To Use Selenium Successfully
How To Use Selenium SuccessfullyHow To Use Selenium Successfully
How To Use Selenium Successfully
Dave Haeffner
 
How to use selenium successfully
How to use selenium successfullyHow to use selenium successfully
How to use selenium successfully
TEST Huddle
 
Selenium for everyone
Selenium for everyoneSelenium for everyone
Selenium for everyone
Tft Us
 
Selenium.pptx
Selenium.pptxSelenium.pptx
Selenium.pptx
orbitprojects
 
Selenium
SeleniumSelenium
Selenium
mdfkhan625
 
Selenium
SeleniumSelenium
Selenium
eduquer
 
How To Use Selenium Successfully (Java Edition)
How To Use Selenium Successfully (Java Edition)How To Use Selenium Successfully (Java Edition)
How To Use Selenium Successfully (Java Edition)Dave Haeffner
 
Basic Selenium Training
Basic Selenium TrainingBasic Selenium Training
Basic Selenium Training
Dipesh Bhatewara
 
Selenium digitalinfobytes-120829005812-phpapp02
Selenium digitalinfobytes-120829005812-phpapp02Selenium digitalinfobytes-120829005812-phpapp02
Selenium digitalinfobytes-120829005812-phpapp02Kdeepapal Mishra
 
Selenium testing - Handle Elements in WebDriver
Selenium testing - Handle Elements in WebDriver Selenium testing - Handle Elements in WebDriver
Selenium testing - Handle Elements in WebDriver
Vibrant Technologies & Computers
 
Selenium Interview Questions And Answers | Selenium Interview Questions | Sel...
Selenium Interview Questions And Answers | Selenium Interview Questions | Sel...Selenium Interview Questions And Answers | Selenium Interview Questions | Sel...
Selenium Interview Questions And Answers | Selenium Interview Questions | Sel...
Simplilearn
 
Automated ui-testing
Automated ui-testingAutomated ui-testing
Automated ui-testing
Slobodan Lohja
 
Automation Testing using Selenium Webdriver
Automation Testing using Selenium WebdriverAutomation Testing using Selenium Webdriver
Automation Testing using Selenium Webdriver
Pankaj Biswas
 
Getting Started with Selenium
Getting Started with SeleniumGetting Started with Selenium
Getting Started with Selenium
Dave Haeffner
 

Similar to Selenium rc ppt (20)

Test_Automation using Selenium.ppt
Test_Automation using Selenium.pptTest_Automation using Selenium.ppt
Test_Automation using Selenium.ppt
 
Karate _Framework.ppt
Karate _Framework.pptKarate _Framework.ppt
Karate _Framework.ppt
 
Mastering Test Automation: How to Use Selenium Successfully
Mastering Test Automation: How to Use Selenium Successfully Mastering Test Automation: How to Use Selenium Successfully
Mastering Test Automation: How to Use Selenium Successfully
 
How To Use Selenium Successfully (Java Edition)
How To Use Selenium Successfully (Java Edition)How To Use Selenium Successfully (Java Edition)
How To Use Selenium Successfully (Java Edition)
 
Selenium Tips & Tricks, presented at the Tel Aviv Selenium Meetup
Selenium Tips & Tricks, presented at the Tel Aviv Selenium MeetupSelenium Tips & Tricks, presented at the Tel Aviv Selenium Meetup
Selenium Tips & Tricks, presented at the Tel Aviv Selenium Meetup
 
How To Use Selenium Successfully
How To Use Selenium SuccessfullyHow To Use Selenium Successfully
How To Use Selenium Successfully
 
How to use selenium successfully
How to use selenium successfullyHow to use selenium successfully
How to use selenium successfully
 
Selenium for everyone
Selenium for everyoneSelenium for everyone
Selenium for everyone
 
Selenium.pptx
Selenium.pptxSelenium.pptx
Selenium.pptx
 
Selenium
SeleniumSelenium
Selenium
 
Selenium
SeleniumSelenium
Selenium
 
How To Use Selenium Successfully (Java Edition)
How To Use Selenium Successfully (Java Edition)How To Use Selenium Successfully (Java Edition)
How To Use Selenium Successfully (Java Edition)
 
Selenium Concepts
Selenium ConceptsSelenium Concepts
Selenium Concepts
 
Basic Selenium Training
Basic Selenium TrainingBasic Selenium Training
Basic Selenium Training
 
Selenium digitalinfobytes-120829005812-phpapp02
Selenium digitalinfobytes-120829005812-phpapp02Selenium digitalinfobytes-120829005812-phpapp02
Selenium digitalinfobytes-120829005812-phpapp02
 
Selenium testing - Handle Elements in WebDriver
Selenium testing - Handle Elements in WebDriver Selenium testing - Handle Elements in WebDriver
Selenium testing - Handle Elements in WebDriver
 
Selenium Interview Questions And Answers | Selenium Interview Questions | Sel...
Selenium Interview Questions And Answers | Selenium Interview Questions | Sel...Selenium Interview Questions And Answers | Selenium Interview Questions | Sel...
Selenium Interview Questions And Answers | Selenium Interview Questions | Sel...
 
Automated ui-testing
Automated ui-testingAutomated ui-testing
Automated ui-testing
 
Automation Testing using Selenium Webdriver
Automation Testing using Selenium WebdriverAutomation Testing using Selenium Webdriver
Automation Testing using Selenium Webdriver
 
Getting Started with Selenium
Getting Started with SeleniumGetting Started with Selenium
Getting Started with Selenium
 

Recently uploaded

Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
Atul Kumar Singh
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
Delapenabediema
 
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCECLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
BhavyaRajput3
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
EverAndrsGuerraGuerr
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
EugeneSaldivar
 
"Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe..."Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe...
SACHIN R KONDAGURI
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
Nguyen Thanh Tu Collection
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Thiyagu K
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
Jisc
 
The Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptxThe Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptx
DhatriParmar
 
The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
kaushalkr1407
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
siemaillard
 
Polish students' mobility in the Czech Republic
Polish students' mobility in the Czech RepublicPolish students' mobility in the Czech Republic
Polish students' mobility in the Czech Republic
Anna Sz.
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
heathfieldcps1
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
Celine George
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
TechSoup
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
Peter Windle
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
joachimlavalley1
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
camakaiclarkmusic
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
DeeptiGupta154
 

Recently uploaded (20)

Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
 
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCECLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
 
"Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe..."Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe...
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
 
The Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptxThe Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptx
 
The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
Polish students' mobility in the Czech Republic
Polish students' mobility in the Czech RepublicPolish students' mobility in the Czech Republic
Polish students' mobility in the Czech Republic
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
 

Selenium rc ppt

  • 2. Agenda What is Selenium ? • Selenium Components • Advantages of Selenium • Selenese-The language of Selenium  Automating Tests using Selenium • Prerequisites and Test Bed Setup • Scripting Techniques and Best Practices  Known Issues & Workarounds  Benefits to Organization  Drawbacks  Selenium Reference on the Internet • Source Repository • Selenium User Forums • Selenium Developer Forums • Selenium-How to Contribute www.mindqonline.com
  • 3. What is Selenium ? www.mindqonline.com
  • 4.  Automation tool for web based applications  Used for functional regression testing  Uses JavaScript  Embeds test automation engine in your browser www.mindqonline.com
  • 5. Selenium Components 1. Selenium Core  Core engine of Selenium  JavaScript/DHTML library  Other Selenium components such as IDE and RC build on it  Supports a variety of platforms  Windows: Internet Explorer 6.0 and 7.0 , FireFox 0.8 to 2.0  Mac OS X: Safari 2.0.4+, FireFox 0.8 to 2.0 , Camino 1.0a1  Linux: FireFox 0.8 to 2.0 Konqueror www.mindqonline.com
  • 6. Selenium Components 2. Selenium IDE  Integrated development environment for Selenium tests  Enables you to record a browser session  Implemented as a Mozilla FireFox extension  Allows you to record, edit, and debug tests. www.mindqonline.com
  • 7. Selenium Components.. 3. Selenium Remote Control (RC)  Provides Selenium Server  Start/Stop/Control supported browsers  Script web application UI tests  Works with any HTTP website  Uses any JavaScript enabled browser www.mindqonline.com
  • 8. How Selenium RC Works www.mindqonline.com
  • 9. Advantages of Selenium  Open source, free software  Easy Installation  Scripting Techniques : Easy recording and playback of scripts Modular scripts  Compatibility :  Multiple operating systems (Windows, Linux, Mac)  Allows cross browser testing (Record in FireFox, execute in IE)  No dedicated machine required for test execution (user can work in parallel).  Integration with third party tools. Example : RTH Test Case Management Tool. www.mindqonline.com
  • 10. Selenese-The language of Selenium Selenese consists of Actions, Accessors, Element Locators and Variables • Actions - Commands for the selenese language to perform a action on a web application  Script performs a particular action  Typically take element locator and possibly a value  Examples : 1.Open- open a url 2.Click- click button, link, etc.. 3.Type- type text in text field www.mindqonline.com
  • 11. Selenese-The language of Selenium • Accessors – Verification / Validation checkpoints for the tool Data related Take only element locators Examples : 1. store(locator,variable) 2. verify(locator,pattern) 3.eval- return value of JS expression 4. bodyText-contents of HTML body www.mindqonline.com
  • 12. Selenese-The language of Selenium • Element Locators  These can be id, name, identifier, link, etc..  Variables used in scripting • Information regarding Actions, Accessors can be found in class ‘Selenium Driver’ in installed directory For e.g. C:Seleniumselenium-remote-control- 0.9.0rubydocindex.html www.mindqonline.com
  • 13. Sample Script require "selenium" require "test/unit" def test_new @selenium.open "/" @selenium.type "q", "Hello" @selenium.click "btnG" @selenium.wait_for_page_to_load "30000" begin assert @selenium.is_text_present("Hello is a new way to look at pictures with friends and family. ) rescue Test::Unit::AssertionFailedError @verification_errors << $! end temp = @selenium.get_text("//div[2]/div[1]") end end www.mindqonline.com
  • 14. Automating Tests using Selenium www.mindqonline.com
  • 15.  Software :  Selenium IDE, Mozilla FireFox for script recording  Selenium Server, Java for running scripts  Configuration :  Set path variables  Use –multiWindow option while starting server  Resource :  Users… should have basic scripting knowledge  Hardware… No specific requirement the basic configuration for a server – P4, 512 MB RAM is good enough. Prerequisites and Test Bed Setup www.mindqonline.com
  • 16. In order to ensure the quality of scripts and reduce maintenance, it is best to have scripting techniques and best practices. Some of which are…  Comments and proper formatting in scripts  Scripting considerations for integration with other tools  Documentation of basic data required for scripts  Documentation of new functions added for scripts  Follow fixed, logical scripting format  Include code to handle Selenium errors  Scripting according to application specific issues Scripting Techniques and Best Practices www.mindqonline.com
  • 17. Known Issues & Workarounds www.mindqonline.com
  • 18. Elements not found on page Potential Causes :  Can happen due to execution speed of Selenium  Elements do not load on page in time Fix :  Add code in scripts which waits for elements Additional issues :  Sometimes existing elements on a page are not detected  Sometimes elements on a page have a same label Solution :  Obtain exact element label from source code  Label can be used in scripts for accuracy www.mindqonline.com
  • 19. Steps : Window id required for automated operations in window At times if id is not obtained during recording, go to window and perform operations Window id will be obtained after this action. Handling of Popup windows www.mindqonline.com
  • 20. Option :  -multiWindow option handles potential frame problems Causes :  At times required name of frame not obtained in recording Fix :  Obtain frame label from source code  Also can be obtained from browser URL bar Handling of Frames www.mindqonline.com
  • 22.  Automation Benefits :  Usual benefits for automation e.g. Time saving  Time required for sanity reduced ( 12 man hours to 3 man hours, build frequency of 4- 5 builds a month )  For one of the projects, Sanity suite automated : 243 test cases  Good Returns on Zero Investment  Increasing Productivity  Cost saving as it is open-source  QA engineers get familiar with scripting languages like Ruby, Perl etc apart from manual testing  Caveat:  Full automation and maintenance has not been evaluated and that can be a risk Benefits to Organization www.mindqonline.com
  • 23. Drawbacks  Lack of exhaustive formal guidance material  Mozilla FireFox browser is required for script recording  Only works with web based applications www.mindqonline.com