SlideShare une entreprise Scribd logo
1  sur  23
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

Contenu connexe

Tendances

Web application testing with Selenium
Web application testing with SeleniumWeb application testing with Selenium
Web application testing with SeleniumKerry Buckley
 
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!
 
Python selenium
Python seleniumPython selenium
Python seleniumDucat
 
Automated Web Testing With Selenium
Automated Web Testing With SeleniumAutomated Web Testing With Selenium
Automated Web Testing With SeleniumDeepak Mittal
 
Selenium institute in bangalore
Selenium institute in bangaloreSelenium institute in bangalore
Selenium institute in bangaloreTIB Academy
 
Test automation using selenium
Test automation using seleniumTest automation using selenium
Test automation using seleniumshreyas JC
 
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 2davehunt82
 
Selenium test automation
Selenium test automationSelenium test automation
Selenium test automationSrikanth Vuriti
 
Test Automation and Selenium
Test Automation and SeleniumTest Automation and Selenium
Test Automation and SeleniumKarapet Sarkisyan
 
Selenium WebDriver with C#
Selenium WebDriver with C#Selenium WebDriver with C#
Selenium WebDriver with C#srivinayak
 

Tendances (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#
 

Similaire à Selenium rc ppt

Test_Automation using Selenium.ppt
Test_Automation using Selenium.pptTest_Automation using Selenium.ppt
Test_Automation using Selenium.pptSamKhan531862
 
Karate _Framework.ppt
Karate _Framework.pptKarate _Framework.ppt
Karate _Framework.pptSamKhan531862
 
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 MeetupDave Haeffner
 
How To Use Selenium Successfully
How To Use Selenium SuccessfullyHow To Use Selenium Successfully
How To Use Selenium SuccessfullyDave Haeffner
 
How to use selenium successfully
How to use selenium successfullyHow to use selenium successfully
How to use selenium successfullyTEST Huddle
 
Selenium for everyone
Selenium for everyoneSelenium for everyone
Selenium for everyoneTft Us
 
Selenium
SeleniumSelenium
Seleniumeduquer
 
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
 
Selenium digitalinfobytes-120829005812-phpapp02
Selenium digitalinfobytes-120829005812-phpapp02Selenium digitalinfobytes-120829005812-phpapp02
Selenium digitalinfobytes-120829005812-phpapp02Kdeepapal Mishra
 
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
 
Automation Testing using Selenium Webdriver
Automation Testing using Selenium WebdriverAutomation Testing using Selenium Webdriver
Automation Testing using Selenium WebdriverPankaj Biswas
 
Getting Started with Selenium
Getting Started with SeleniumGetting Started with Selenium
Getting Started with SeleniumDave Haeffner
 

Similaire à 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
 
Selenium digitalinfobytes-120829005812-phpapp02
Selenium digitalinfobytes-120829005812-phpapp02Selenium digitalinfobytes-120829005812-phpapp02
Selenium digitalinfobytes-120829005812-phpapp02
 
Basic Selenium Training
Basic Selenium TrainingBasic Selenium Training
Basic Selenium Training
 
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
 

Dernier

Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Mark Reed
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...Postal Advocate Inc.
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPCeline George
 
Culture Uniformity or Diversity IN SOCIOLOGY.pptx
Culture Uniformity or Diversity IN SOCIOLOGY.pptxCulture Uniformity or Diversity IN SOCIOLOGY.pptx
Culture Uniformity or Diversity IN SOCIOLOGY.pptxPoojaSen20
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxAnupkumar Sharma
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parentsnavabharathschool99
 
Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptxSherlyMaeNeri
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...JhezDiaz1
 
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxBarangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxCarlos105
 
Karra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxKarra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxAshokKarra1
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfSpandanaRallapalli
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management SystemChristalin Nelson
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...Nguyen Thanh Tu Collection
 
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYKayeClaireEstoconing
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPCeline George
 

Dernier (20)

Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptxFINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERP
 
Culture Uniformity or Diversity IN SOCIOLOGY.pptx
Culture Uniformity or Diversity IN SOCIOLOGY.pptxCulture Uniformity or Diversity IN SOCIOLOGY.pptx
Culture Uniformity or Diversity IN SOCIOLOGY.pptx
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parents
 
Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptx
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
 
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxBarangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
 
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptxLEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
 
Karra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxKarra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptx
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdf
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management System
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
 
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERP
 

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