SlideShare una empresa de Scribd logo
1 de 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

Más contenido relacionado

La actualidad más candente

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
 

La actualidad más candente (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 a 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
 

Similar a 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
 

Último

ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.MaryamAhmad92
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024Elizabeth Walsh
 
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxExploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxPooja Bhuva
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxDr. Ravikiran H M Gowda
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...ZurliaSoop
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxmarlenawright1
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the ClassroomPooky Knightsmith
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxheathfieldcps1
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Jisc
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfSherif Taha
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jisc
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxDr. Sarita Anand
 
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxCOMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxannathomasp01
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsKarakKing
 
How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17Celine George
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxJisc
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxDenish Jangid
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...Poonam Aher Patil
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxAreebaZafar22
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and ModificationsMJDuyan
 

Último (20)

ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxExploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptx
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxCOMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
 
How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 

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