SlideShare a Scribd company logo
1 of 16
Download to read offline
Selenium IDE
and Locators
Presenter:

Manu Parashar
12/24/2013
Mindfire Solutions
About Me:
Manu Parashar
Skills:

Automation: Selenium Webdriver, Selenium RC, QTP 11
Frameworks: Junit, Testng
PL: Java, C#

Connect Me:

LinkedIn: http://www.linkedin.com/in/parasharmanu

Google+: https://plus.google.com/110738751918785957229/

Contact Me:

Email: manup@mindfiresolutions.com/ manu.aug5@gmail.com
Skype: mfsi_manup

Presenter: Manu Parashar, Mindfire Solutions
Agenda
1.

Selenium IDE
Introduction to the IDE
IDE Installation
Features of IDE
Creating Test cases using Record feature
Executing Test cases using Play feature

2.

Locators
Types of Locators
Locating Techniques
Locators examples

Presenter: Manu Parashar, Mindfire Solutions
Recap
 What is Selenium?
 Features of Selenium?
 Tools under Selenium's Tool Suite?
 How Remote Control(RC) works?
 How Webdriver works?
 Features of Selenium IDE?
 Different types of Locators?

Presenter: Manu Parashar, Mindfire Solutions
Introduction to Selenium IDE
Integrated development environment for Selenium scripts.
Contains a context menu that allows to first select a UI element
from the browser’s current page and then select from a list of
Selenium commands with parameters pre-defined according to
the context of the selected UI element.
Includes the entire Selenium Core, allowing you to easily and
quickly record and play back tests in the actual environment that
they will run in.
It is not only a recording tool: it is a complete IDE. Either its
recording capability can be used, or scripts may be edited.

Presenter: Manu Parashar, Mindfire Solutions
IDE Installation
Selenium IDE is distributed as Firefox extension:






Go to the Selenium website (http://www.seleniumhq.org)
or Firefox add-ons website (http://addons.mozilla.org).
Download the latest release.
Follow the instructions and restart Firefox.
Selenium IDE is accessible from the ‘Tools’ Menu of
Firefox .

Presenter: Manu Parashar, Mindfire Solutions
Features of IDE









Easy-to-use Firefox plug-in
Easy record and playback
Intelligent field selection will use IDs, names, or
XPath as needed
Autocomplete for all common Selenium commands
Debugging feature with step-by-step and
breakpoints
Save tests as HTML, Ruby scripts, or any other
format
Option to automatically assert the title of every
page
Easy customization through plugins
Presenter: Manu Parashar, Mindfire Solutions
Creating Test Cases
Recording

During recording, Selenium-IDE will automatically insert
commands into your test case based on your actions.
Record button is ON by default

Adding Verifications and Asserts With the Context
Menu
Editing

Insert Command
Insert Comment
Edit a Command or Comment

Presenter: Manu Parashar, Mindfire Solutions
Executing Test Cases


Run a Test Case (clicking Run button)



Run a Test Suite (clicking Run All button)



Stop and Start (Pause/Resume button)



Stop in the Middle (Toggle Breakpoint option)



Start from the Middle (Set/Clear Start Point option)



Run Any Single Command (Double click)

Presenter: Manu Parashar, Mindfire Solutions
Selenese
Domain Specific Language(DSL) to write tests. Simple xHTML
tables of 3 columns and ‘n’ rows:
• A method on 1st column: the action to perform

• A locator on 2nd column: the subject of the method (ie: what

element is acted upon)
• A value on 3rd column: the value to be passed to the method
(what to type in a text field for instance)

Selenium commands that can be categorized as:

•Actions: commands that manipulate the state of application like

clicking links or buttons.
•Accessors: examine the state of the application and store values
in variables.
•Assertions: are like Accessors, but they verify that the state of
the application conforms to what is expected. Eg. “assert”,
“verify”, and ” waitFor”
Presenter: Manu Parashar, Mindfire Solutions
Locators
Attributes-based locators:

It relies on the attributes of the elements to locate them.

Identifier

Id

Name

Link

CSS

Structure-based locators:

It rely on the structure of the page to find elements.

DOM

XPath

CSS
Presenter: Manu Parashar, Mindfire Solutions
Locating Techniques

Presenter: Manu Parashar, Mindfire Solutions
Identifier: works with the id and name attributes of html tags.
Eg. identifier=loginForm, identifier=password

Id: more limited than the identifier locator, but more explicit.
Eg. id=loginForm

Name: locate the first element with a matching name attribute.
Eg. name=username, name=continue value=Clear

Link: locates a hyperlink by using the text of the link
Eg. link=Continue, link=Cancel

CSS: Selectors for binding style properties to elements in the
document
Eg. css=form#loginForm, css=input[name="username"],
css=input.required[type="text"], css=input.passfield,

Presenter: Manu Parashar, Mindfire Solutions
DOM: works by locating elements that matches the javascript
expression refering to an element in the DOM of the page.
Eg. dom=document.getElementById('loginForm'),
dom=document.forms['loginForm'], dom=document.forms[0],
document.forms[0].username, document.forms[0].elements[3]

Xpath: language used for locating nodes in an XML document.

Eg. xpath=/html/body/form[1]  - Absolute path (would break if
HTML was changed only slightly)
//form[1] (3) - First form element in the HTML
xpath=//form[@id='loginForm'] (3) - The form element with
attribute named ‘id’ and the value
‘loginForm’
//input[@name='username'] (4) - First input element with
attribute named ‘name’ and the value
‘username’
//form[@id='loginForm']/input[1] (4) - First input child
element of the form element with attribute
named ‘id’ and the value ‘loginForm’
Presenter: Manu Parashar, Mindfire Solutions
Questions
??

Presenter: Manu Parashar, Mindfire Solutions
Thank you

Presenter: Manu Parashar, Mindfire Solutions

More Related Content

What's hot

Automation - web testing with selenium
Automation - web testing with seleniumAutomation - web testing with selenium
Automation - web testing with seleniumTzirla Rozental
 
Java Basics for selenium
Java Basics for seleniumJava Basics for selenium
Java Basics for seleniumapoorvams
 
Data driven Automation Framework with Selenium
Data driven Automation Framework with Selenium Data driven Automation Framework with Selenium
Data driven Automation Framework with Selenium Edureka!
 
An overview of selenium webdriver
An overview of selenium webdriverAn overview of selenium webdriver
An overview of selenium webdriverAnuraj S.L
 
TestNG Session presented in Xebia XKE
TestNG Session presented in Xebia XKETestNG Session presented in Xebia XKE
TestNG Session presented in Xebia XKEAbhishek Yadav
 
Web application testing with Selenium
Web application testing with SeleniumWeb application testing with Selenium
Web application testing with SeleniumKerry Buckley
 
Locators in selenium - BNT 09
Locators in selenium - BNT 09Locators in selenium - BNT 09
Locators in selenium - BNT 09weekendtesting
 
Selenium- A Software Testing Tool
Selenium- A Software Testing ToolSelenium- A Software Testing Tool
Selenium- A Software Testing ToolZeba Tahseen
 
Setting up Page Object Model in Automation Framework
Setting up Page Object Model in Automation FrameworkSetting up Page Object Model in Automation Framework
Setting up Page Object Model in Automation Frameworkvaluebound
 
Selenium - Introduction
Selenium - IntroductionSelenium - Introduction
Selenium - IntroductionAmr E. Mohamed
 
Xpath in Selenium | Selenium Xpath Tutorial | Selenium Xpath Examples | Selen...
Xpath in Selenium | Selenium Xpath Tutorial | Selenium Xpath Examples | Selen...Xpath in Selenium | Selenium Xpath Tutorial | Selenium Xpath Examples | Selen...
Xpath in Selenium | Selenium Xpath Tutorial | Selenium Xpath Examples | Selen...Edureka!
 
Introduction to Automation Testing
Introduction to Automation TestingIntroduction to Automation Testing
Introduction to Automation TestingArchana Krushnan
 
Page Object Model and Implementation in Selenium
Page Object Model and Implementation in Selenium  Page Object Model and Implementation in Selenium
Page Object Model and Implementation in Selenium Zoe Gilbert
 

What's hot (20)

Selenium WebDriver
Selenium WebDriverSelenium WebDriver
Selenium WebDriver
 
Automation - web testing with selenium
Automation - web testing with seleniumAutomation - web testing with selenium
Automation - web testing with selenium
 
Selenium with java
Selenium with javaSelenium with java
Selenium with java
 
Java Basics for selenium
Java Basics for seleniumJava Basics for selenium
Java Basics for selenium
 
SELENIUM PPT.pdf
SELENIUM PPT.pdfSELENIUM PPT.pdf
SELENIUM PPT.pdf
 
Introduction to Selenium Web Driver
Introduction to Selenium Web DriverIntroduction to Selenium Web Driver
Introduction to Selenium Web Driver
 
Data driven Automation Framework with Selenium
Data driven Automation Framework with Selenium Data driven Automation Framework with Selenium
Data driven Automation Framework with Selenium
 
An overview of selenium webdriver
An overview of selenium webdriverAn overview of selenium webdriver
An overview of selenium webdriver
 
TestNG Session presented in Xebia XKE
TestNG Session presented in Xebia XKETestNG Session presented in Xebia XKE
TestNG Session presented in Xebia XKE
 
Web application testing with Selenium
Web application testing with SeleniumWeb application testing with Selenium
Web application testing with Selenium
 
Locators in selenium - BNT 09
Locators in selenium - BNT 09Locators in selenium - BNT 09
Locators in selenium - BNT 09
 
TestNG with selenium
TestNG with seleniumTestNG with selenium
TestNG with selenium
 
TestNG Framework
TestNG Framework TestNG Framework
TestNG Framework
 
Selenium- A Software Testing Tool
Selenium- A Software Testing ToolSelenium- A Software Testing Tool
Selenium- A Software Testing Tool
 
Setting up Page Object Model in Automation Framework
Setting up Page Object Model in Automation FrameworkSetting up Page Object Model in Automation Framework
Setting up Page Object Model in Automation Framework
 
Selenium - Introduction
Selenium - IntroductionSelenium - Introduction
Selenium - Introduction
 
Xpath in Selenium | Selenium Xpath Tutorial | Selenium Xpath Examples | Selen...
Xpath in Selenium | Selenium Xpath Tutorial | Selenium Xpath Examples | Selen...Xpath in Selenium | Selenium Xpath Tutorial | Selenium Xpath Examples | Selen...
Xpath in Selenium | Selenium Xpath Tutorial | Selenium Xpath Examples | Selen...
 
Introduction to Automation Testing
Introduction to Automation TestingIntroduction to Automation Testing
Introduction to Automation Testing
 
Page Object Model and Implementation in Selenium
Page Object Model and Implementation in Selenium  Page Object Model and Implementation in Selenium
Page Object Model and Implementation in Selenium
 
testng
testngtestng
testng
 

Similar to Selenium IDE LOCATORS

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
 
DSL, Page Object and Selenium – a way to reliable functional tests
DSL, Page Object and Selenium – a way to reliable functional testsDSL, Page Object and Selenium – a way to reliable functional tests
DSL, Page Object and Selenium – a way to reliable functional testsMikalai Alimenkou
 
Selenium training in pune course content advanto software
Selenium training in pune   course content advanto softwareSelenium training in pune   course content advanto software
Selenium training in pune course content advanto softwareAdvanto Software
 
FluentSelenium Presentation Code Camp09
FluentSelenium Presentation Code Camp09FluentSelenium Presentation Code Camp09
FluentSelenium Presentation Code Camp09Pyxis Technologies
 
Selenium rc ppt
Selenium rc pptSelenium rc ppt
Selenium rc pptmindqqa
 
Selenium-Webdriver With PHPUnit Automation test for Joomla CMS!
Selenium-Webdriver With PHPUnit Automation test for Joomla CMS!Selenium-Webdriver With PHPUnit Automation test for Joomla CMS!
Selenium-Webdriver With PHPUnit Automation test for Joomla CMS!Puneet Kala
 
Mastering Test Automation: How To Use Selenium Successfully
Mastering Test Automation: How To Use Selenium SuccessfullyMastering Test Automation: How To Use Selenium Successfully
Mastering Test Automation: How To Use Selenium SuccessfullySpringPeople
 
The "Holy Grail" of Dev/Ops
The "Holy Grail" of Dev/OpsThe "Holy Grail" of Dev/Ops
The "Holy Grail" of Dev/OpsErik Osterman
 
Selenium course training institute ameerpet hyderabad
Selenium course training institute ameerpet hyderabadSelenium course training institute ameerpet hyderabad
Selenium course training institute ameerpet hyderabadSathya Technologies
 
Selenium course training institute ameerpet hyderabad – Best software trainin...
Selenium course training institute ameerpet hyderabad – Best software trainin...Selenium course training institute ameerpet hyderabad – Best software trainin...
Selenium course training institute ameerpet hyderabad – Best software trainin...Sathya Technologies
 
SPCA2013 - Test-driven Development with SharePoint 2013 and Visual Studio
SPCA2013 - Test-driven Development with SharePoint 2013 and Visual StudioSPCA2013 - Test-driven Development with SharePoint 2013 and Visual Studio
SPCA2013 - Test-driven Development with SharePoint 2013 and Visual StudioNCCOMMS
 
Web testing with Selenium
Web testing with SeleniumWeb testing with Selenium
Web testing with SeleniumXBOSoft
 
The Professional Programmer
The Professional ProgrammerThe Professional Programmer
The Professional ProgrammerDave Cross
 
Generative AI in CSharp with Semantic Kernel.pptx
Generative AI in CSharp with Semantic Kernel.pptxGenerative AI in CSharp with Semantic Kernel.pptx
Generative AI in CSharp with Semantic Kernel.pptxAlon Fliess
 

Similar to Selenium IDE LOCATORS (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
 
DSL, Page Object and Selenium – a way to reliable functional tests
DSL, Page Object and Selenium – a way to reliable functional testsDSL, Page Object and Selenium – a way to reliable functional tests
DSL, Page Object and Selenium – a way to reliable functional tests
 
Selenium training in pune course content advanto software
Selenium training in pune   course content advanto softwareSelenium training in pune   course content advanto software
Selenium training in pune course content advanto software
 
FluentSelenium Presentation Code Camp09
FluentSelenium Presentation Code Camp09FluentSelenium Presentation Code Camp09
FluentSelenium Presentation Code Camp09
 
Selenium rc ppt
Selenium rc pptSelenium rc ppt
Selenium rc ppt
 
selenium.ppt
selenium.pptselenium.ppt
selenium.ppt
 
selenium.ppt
selenium.pptselenium.ppt
selenium.ppt
 
selenium.ppt
selenium.pptselenium.ppt
selenium.ppt
 
Selenium IDE
Selenium IDESelenium IDE
Selenium IDE
 
Selenium-Webdriver With PHPUnit Automation test for Joomla CMS!
Selenium-Webdriver With PHPUnit Automation test for Joomla CMS!Selenium-Webdriver With PHPUnit Automation test for Joomla CMS!
Selenium-Webdriver With PHPUnit Automation test for Joomla CMS!
 
Mastering Test Automation: How To Use Selenium Successfully
Mastering Test Automation: How To Use Selenium SuccessfullyMastering Test Automation: How To Use Selenium Successfully
Mastering Test Automation: How To Use Selenium Successfully
 
The "Holy Grail" of Dev/Ops
The "Holy Grail" of Dev/OpsThe "Holy Grail" of Dev/Ops
The "Holy Grail" of Dev/Ops
 
Selenium course training institute ameerpet hyderabad
Selenium course training institute ameerpet hyderabadSelenium course training institute ameerpet hyderabad
Selenium course training institute ameerpet hyderabad
 
Selenium course training institute ameerpet hyderabad – Best software trainin...
Selenium course training institute ameerpet hyderabad – Best software trainin...Selenium course training institute ameerpet hyderabad – Best software trainin...
Selenium course training institute ameerpet hyderabad – Best software trainin...
 
SPCA2013 - Test-driven Development with SharePoint 2013 and Visual Studio
SPCA2013 - Test-driven Development with SharePoint 2013 and Visual StudioSPCA2013 - Test-driven Development with SharePoint 2013 and Visual Studio
SPCA2013 - Test-driven Development with SharePoint 2013 and Visual Studio
 
Web testing with Selenium
Web testing with SeleniumWeb testing with Selenium
Web testing with Selenium
 
The Professional Programmer
The Professional ProgrammerThe Professional Programmer
The Professional Programmer
 
Generative AI in CSharp with Semantic Kernel.pptx
Generative AI in CSharp with Semantic Kernel.pptxGenerative AI in CSharp with Semantic Kernel.pptx
Generative AI in CSharp with Semantic Kernel.pptx
 
VS 2010 codename Rosario
VS 2010 codename RosarioVS 2010 codename Rosario
VS 2010 codename Rosario
 

More from Mindfire Solutions (20)

Physician Search and Review
Physician Search and ReviewPhysician Search and Review
Physician Search and Review
 
diet management app
diet management appdiet management app
diet management app
 
Business Technology Solution
Business Technology SolutionBusiness Technology Solution
Business Technology Solution
 
Remote Health Monitoring
Remote Health MonitoringRemote Health Monitoring
Remote Health Monitoring
 
Influencer Marketing Solution
Influencer Marketing SolutionInfluencer Marketing Solution
Influencer Marketing Solution
 
ELMAH
ELMAHELMAH
ELMAH
 
High Availability of Azure Applications
High Availability of Azure ApplicationsHigh Availability of Azure Applications
High Availability of Azure Applications
 
IOT Hands On
IOT Hands OnIOT Hands On
IOT Hands On
 
Glimpse of Loops Vs Set
Glimpse of Loops Vs SetGlimpse of Loops Vs Set
Glimpse of Loops Vs Set
 
Oracle Sql Developer-Getting Started
Oracle Sql Developer-Getting StartedOracle Sql Developer-Getting Started
Oracle Sql Developer-Getting Started
 
Adaptive Layout In iOS 8
Adaptive Layout In iOS 8Adaptive Layout In iOS 8
Adaptive Layout In iOS 8
 
Introduction to Auto-layout : iOS/Mac
Introduction to Auto-layout : iOS/MacIntroduction to Auto-layout : iOS/Mac
Introduction to Auto-layout : iOS/Mac
 
LINQPad - utility Tool
LINQPad - utility ToolLINQPad - utility Tool
LINQPad - utility Tool
 
Get started with watch kit development
Get started with watch kit developmentGet started with watch kit development
Get started with watch kit development
 
Swift vs Objective-C
Swift vs Objective-CSwift vs Objective-C
Swift vs Objective-C
 
Material Design in Android
Material Design in AndroidMaterial Design in Android
Material Design in Android
 
Introduction to OData
Introduction to ODataIntroduction to OData
Introduction to OData
 
Ext js Part 2- MVC
Ext js Part 2- MVCExt js Part 2- MVC
Ext js Part 2- MVC
 
ExtJs Basic Part-1
ExtJs Basic Part-1ExtJs Basic Part-1
ExtJs Basic Part-1
 
Spring Security Introduction
Spring Security IntroductionSpring Security Introduction
Spring Security Introduction
 

Recently uploaded

AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 

Recently uploaded (20)

AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 

Selenium IDE LOCATORS

  • 1. Selenium IDE and Locators Presenter: Manu Parashar 12/24/2013 Mindfire Solutions
  • 2. About Me: Manu Parashar Skills: Automation: Selenium Webdriver, Selenium RC, QTP 11 Frameworks: Junit, Testng PL: Java, C# Connect Me: LinkedIn: http://www.linkedin.com/in/parasharmanu Google+: https://plus.google.com/110738751918785957229/ Contact Me: Email: manup@mindfiresolutions.com/ manu.aug5@gmail.com Skype: mfsi_manup Presenter: Manu Parashar, Mindfire Solutions
  • 3. Agenda 1. Selenium IDE Introduction to the IDE IDE Installation Features of IDE Creating Test cases using Record feature Executing Test cases using Play feature 2. Locators Types of Locators Locating Techniques Locators examples Presenter: Manu Parashar, Mindfire Solutions
  • 4. Recap  What is Selenium?  Features of Selenium?  Tools under Selenium's Tool Suite?  How Remote Control(RC) works?  How Webdriver works?  Features of Selenium IDE?  Different types of Locators? Presenter: Manu Parashar, Mindfire Solutions
  • 5. Introduction to Selenium IDE Integrated development environment for Selenium scripts. Contains a context menu that allows to first select a UI element from the browser’s current page and then select from a list of Selenium commands with parameters pre-defined according to the context of the selected UI element. Includes the entire Selenium Core, allowing you to easily and quickly record and play back tests in the actual environment that they will run in. It is not only a recording tool: it is a complete IDE. Either its recording capability can be used, or scripts may be edited. Presenter: Manu Parashar, Mindfire Solutions
  • 6. IDE Installation Selenium IDE is distributed as Firefox extension:     Go to the Selenium website (http://www.seleniumhq.org) or Firefox add-ons website (http://addons.mozilla.org). Download the latest release. Follow the instructions and restart Firefox. Selenium IDE is accessible from the ‘Tools’ Menu of Firefox . Presenter: Manu Parashar, Mindfire Solutions
  • 7. Features of IDE         Easy-to-use Firefox plug-in Easy record and playback Intelligent field selection will use IDs, names, or XPath as needed Autocomplete for all common Selenium commands Debugging feature with step-by-step and breakpoints Save tests as HTML, Ruby scripts, or any other format Option to automatically assert the title of every page Easy customization through plugins Presenter: Manu Parashar, Mindfire Solutions
  • 8. Creating Test Cases Recording During recording, Selenium-IDE will automatically insert commands into your test case based on your actions. Record button is ON by default Adding Verifications and Asserts With the Context Menu Editing Insert Command Insert Comment Edit a Command or Comment Presenter: Manu Parashar, Mindfire Solutions
  • 9. Executing Test Cases  Run a Test Case (clicking Run button)  Run a Test Suite (clicking Run All button)  Stop and Start (Pause/Resume button)  Stop in the Middle (Toggle Breakpoint option)  Start from the Middle (Set/Clear Start Point option)  Run Any Single Command (Double click) Presenter: Manu Parashar, Mindfire Solutions
  • 10. Selenese Domain Specific Language(DSL) to write tests. Simple xHTML tables of 3 columns and ‘n’ rows: • A method on 1st column: the action to perform • A locator on 2nd column: the subject of the method (ie: what element is acted upon) • A value on 3rd column: the value to be passed to the method (what to type in a text field for instance) Selenium commands that can be categorized as: •Actions: commands that manipulate the state of application like clicking links or buttons. •Accessors: examine the state of the application and store values in variables. •Assertions: are like Accessors, but they verify that the state of the application conforms to what is expected. Eg. “assert”, “verify”, and ” waitFor” Presenter: Manu Parashar, Mindfire Solutions
  • 11. Locators Attributes-based locators: It relies on the attributes of the elements to locate them.  Identifier  Id  Name  Link  CSS Structure-based locators: It rely on the structure of the page to find elements.  DOM  XPath  CSS Presenter: Manu Parashar, Mindfire Solutions
  • 12. Locating Techniques Presenter: Manu Parashar, Mindfire Solutions
  • 13. Identifier: works with the id and name attributes of html tags. Eg. identifier=loginForm, identifier=password Id: more limited than the identifier locator, but more explicit. Eg. id=loginForm Name: locate the first element with a matching name attribute. Eg. name=username, name=continue value=Clear Link: locates a hyperlink by using the text of the link Eg. link=Continue, link=Cancel CSS: Selectors for binding style properties to elements in the document Eg. css=form#loginForm, css=input[name="username"], css=input.required[type="text"], css=input.passfield, Presenter: Manu Parashar, Mindfire Solutions
  • 14. DOM: works by locating elements that matches the javascript expression refering to an element in the DOM of the page. Eg. dom=document.getElementById('loginForm'), dom=document.forms['loginForm'], dom=document.forms[0], document.forms[0].username, document.forms[0].elements[3] Xpath: language used for locating nodes in an XML document. Eg. xpath=/html/body/form[1]  - Absolute path (would break if HTML was changed only slightly) //form[1] (3) - First form element in the HTML xpath=//form[@id='loginForm'] (3) - The form element with attribute named ‘id’ and the value ‘loginForm’ //input[@name='username'] (4) - First input element with attribute named ‘name’ and the value ‘username’ //form[@id='loginForm']/input[1] (4) - First input child element of the form element with attribute named ‘id’ and the value ‘loginForm’ Presenter: Manu Parashar, Mindfire Solutions
  • 16. Thank you Presenter: Manu Parashar, Mindfire Solutions