SlideShare une entreprise Scribd logo
1  sur  31
Télécharger pour lire hors ligne
Rigor Scripting Guide
Best Practices, Conventions, & Helpful Tips for Building Multi-
Step Real Browser Checks
Selectors & Types
What is a selector?
Patterns used to select and identify
items to interact with in the DOM
Selector Types Rigor:
● id
● name
● css
● link
● xpath
Selector Types
id
target the unique identifier of an element on the page
name
target an element with matching name attribute
Selector Types
xpath
target an element in the DOM by using XML syntax
Selector Types
Selector Types
css
target an element by using HTML/CSS syntax
● selector
Selector Types
css
target an element by using HTML/CSS syntax
● CSS path
form > div.row-fluid > input[placeholder='email']
Selector Types
link
target a link associated with an anchor tag (<a>) by specifying the anchor text
Selector Type: CSS Path
HTML Tag
HTML Attributes
CSS Combinators
CSS Pseudo Classes
1
2
3
4
HTML tags designate the element type.
Common HTML tags:
● Heading: <h1>, <h2>,....,<h5>, <h6>
● Paragraph: <p>
● DIV: <div>
● Input: <input>
● Button: <button>
● Iframe: <iframe>
CSS Path
HTML Element/Tag
HTML elements are written with a start tag, end tag, & content in between.
● HTML Attributes provide additional info about HTML elements
● Always specified in the start tag
● Attributes come in name='value' pairs
CSS Path
HTML Attribute
Common HTML attributes:
● class
● href
● name
● style
● type
HINT: always use
single quotes ('single
quotes') and turn
Smart Quotes OFF
4 Different Combinators:
1. Descendant selector (space)
2. Child selector (>)
3. Adjacent sibling selector (+)
4. General sibling selector (~)
Used to combine simple CSS selectors into a path.
CSS Path
Combinators
"A combinator is
something that
explains the
relationship between
the selectors"
-- W3Schools.ocm
Used to define a special state of an element. Append to a simple CSS
selector.
Important Pseudo Classes for CSS Paths:
● :nth-child(index)
● :nth-of-type(index)
CSS Path
Pseudo Classes
form > div:nth-child(2) > input
CSS Path: Examples
tag
class
attribute (name/value pair)
combinator
general syntax
input[placeholder='Email' ]
input.login-input[placeholder='Email' ]
form > div.row-fluid > input[id='email']
#email (CSS version of id='email')
Choosing a Selector
● use developer tools to interact with DOM
(inspector) and JavaScript (console) to
interact with elements of a site
● use 'command + f' in inspector to ensure
that there is only one instance of the
selector you are using
● id first, xpath last
● watch out for dynamic selectors
Best Practices
Real Browser: Check Steps
Wait
● Wait for text present
● Wait for text not present
● Wait for element present
● Wait for element not present
● Wait for element visible
● Wait for element not visible
Action
● Accept Alert
● Clear
● Click
● Dismiss Alert
● Fill in field
● Fill in password field
● Go to URL
● Run javascript
● Select
● Save text from Element
● Save return value from javascript
● Switch to iframe
● Switch to main
Accept Alert
When the JavaScript window.alert() or window.confirm() method is
executed on a page, the "Accept Alert" action will accept this alert.
RBC Steps - Action
window.alert('This is a JavaScript alert');
window.confirm('Confirm this alert.');
RBC Steps - Action
Clear
This action will clear the value of a specified element.
● text field
● radio
● checkbox
● dropdown
RBC Steps - Action
Click
Emulates a click operation for any element on the page. Takes in a selector as
an argument.
div.hidden-phone > input[type='submit]
RBC Steps - Action
window.alert('This is a JavaScript alert');
Dismiss Alert
When the JavaScript window.confirm() method is called, the "Dismiss
Alert" action will reject the request and return false to the console.
Fill in field
Take a selector as an argument and specify a value.
● In some cases, you must precede the 'Fill in field' action with a 'Click' action..
RBC Steps - Action
Fill in password field
This action operates similarly to the "Fill in field" action, but will mask the
input value in Rigor to protect passwords from non-admin users.
RBC Steps - Action
Run javascript
Execute any javascript on the current page in the check; similar to what
would be available in the browser console.
RBC Steps - Action
Select
Select an item from a list by specifying a selector and a corresponding index,
label, or value.
RBC Steps - Action
http://rigor.com/Features
RBC Steps - Action
Save text from element
This action takes in a selector and saves the associated text value to a
variable. Call this variable in a subsequent step by using the {{custom.
your_variable_here}} tag.
?date=2/26/2016&q=30305
RBC Steps - Action
Save return value from javascript
Execute javascript and return a value that will be saved to a variable. Similar
to the "Save text from element" step, you can call this variable in subsequent
steps via the {{custom.your_variable_here}} tag.
1
2
Example: adding tomorrow’s date (2/26/2016) as a parameter to a URL)
Switch to iframe
Interact with the elements inside an iframe by specifying the iframe's
corresponding selector. Once this step is run, the browser can interact with
elements contained in the iframe.
RBC Steps - Action
Switch to main
If you used the "Switch to iframe" step and need to jump out into the main
page, use the "Switch to main" action.
RBC Steps - Action
Wait for text
RBC Steps - Wait
● Present - scans the DOM searching for a text match. Will continue to the
next step when the specified text is present.
● Not present - scans the DOM searching for a text match. If the specified
text is present, the step will fail. If the text does not appear in the DOM
the check will continue to the next step.
● Wait for element present - scans the DOM searching for an id, css,
xpath, name, or link selector. Will continue to the next step in the check
when the specified element is present.
● Wait for element not present - scans the DOM searching for an id, css,
xpath, name, or link selector. If the element doe not appear in the DOM,
the check will continue to the next step.
Wait for element
RBC Steps - Wait
● Wait for element visible - scans the page searching for an id, css, xpath,
name, or link selector to be visible on the page. If an element is present in
the DOM but not visible on the page, this step will fail.
● Wait for element not visible - scans the page searching for an id, css,
xpath, name, or link selector that is not visible on the page. If this element
is present in the DOM but not visible on the page, this step will pass.
Wait for element
RBC Steps - Wait

Contenu connexe

Tendances

RESTful API In Node Js using Express
RESTful API In Node Js using Express RESTful API In Node Js using Express
RESTful API In Node Js using Express Jeetendra singh
 
jQuery from the very beginning
jQuery from the very beginningjQuery from the very beginning
jQuery from the very beginningAnis Ahmad
 
From object oriented to functional domain modeling
From object oriented to functional domain modelingFrom object oriented to functional domain modeling
From object oriented to functional domain modelingMario Fusco
 
Introduction to Node.js
Introduction to Node.jsIntroduction to Node.js
Introduction to Node.jsRob O'Doherty
 
Introduction to Java 11
Introduction to Java 11 Introduction to Java 11
Introduction to Java 11 Knoldus Inc.
 
Redux Toolkit - Quick Intro - 2022
Redux Toolkit - Quick Intro - 2022Redux Toolkit - Quick Intro - 2022
Redux Toolkit - Quick Intro - 2022Fabio Biondi
 
Introduction into ES6 JavaScript.
Introduction into ES6 JavaScript.Introduction into ES6 JavaScript.
Introduction into ES6 JavaScript.boyney123
 
Introduction To Angular's reactive forms
Introduction To Angular's reactive formsIntroduction To Angular's reactive forms
Introduction To Angular's reactive formsNir Kaufman
 
AngularJS Directives
AngularJS DirectivesAngularJS Directives
AngularJS DirectivesEyal Vardi
 
Design functional solutions in Java, a practical example
Design functional solutions in Java, a practical exampleDesign functional solutions in Java, a practical example
Design functional solutions in Java, a practical exampleMarian Wamsiedel
 
Domain Driven Design with the F# type System -- NDC London 2013
Domain Driven Design with the F# type System -- NDC London 2013Domain Driven Design with the F# type System -- NDC London 2013
Domain Driven Design with the F# type System -- NDC London 2013Scott Wlaschin
 
Railway Oriented Programming
Railway Oriented ProgrammingRailway Oriented Programming
Railway Oriented ProgrammingScott Wlaschin
 
The redux saga begins
The redux saga beginsThe redux saga begins
The redux saga beginsDaniel Franz
 
Introducing Riak
Introducing RiakIntroducing Riak
Introducing RiakKevin Smith
 

Tendances (20)

Workshop 21: React Router
Workshop 21: React RouterWorkshop 21: React Router
Workshop 21: React Router
 
RESTful API In Node Js using Express
RESTful API In Node Js using Express RESTful API In Node Js using Express
RESTful API In Node Js using Express
 
jQuery from the very beginning
jQuery from the very beginningjQuery from the very beginning
jQuery from the very beginning
 
jQuery
jQueryjQuery
jQuery
 
Redux workshop
Redux workshopRedux workshop
Redux workshop
 
From object oriented to functional domain modeling
From object oriented to functional domain modelingFrom object oriented to functional domain modeling
From object oriented to functional domain modeling
 
Introduction to Node.js
Introduction to Node.jsIntroduction to Node.js
Introduction to Node.js
 
Introduction to Java 11
Introduction to Java 11 Introduction to Java 11
Introduction to Java 11
 
React Hooks
React HooksReact Hooks
React Hooks
 
Redux Toolkit - Quick Intro - 2022
Redux Toolkit - Quick Intro - 2022Redux Toolkit - Quick Intro - 2022
Redux Toolkit - Quick Intro - 2022
 
Modern JS with ES6
Modern JS with ES6Modern JS with ES6
Modern JS with ES6
 
Introduction into ES6 JavaScript.
Introduction into ES6 JavaScript.Introduction into ES6 JavaScript.
Introduction into ES6 JavaScript.
 
Introduction To Angular's reactive forms
Introduction To Angular's reactive formsIntroduction To Angular's reactive forms
Introduction To Angular's reactive forms
 
AngularJS Directives
AngularJS DirectivesAngularJS Directives
AngularJS Directives
 
Design functional solutions in Java, a practical example
Design functional solutions in Java, a practical exampleDesign functional solutions in Java, a practical example
Design functional solutions in Java, a practical example
 
Domain Driven Design with the F# type System -- NDC London 2013
Domain Driven Design with the F# type System -- NDC London 2013Domain Driven Design with the F# type System -- NDC London 2013
Domain Driven Design with the F# type System -- NDC London 2013
 
Railway Oriented Programming
Railway Oriented ProgrammingRailway Oriented Programming
Railway Oriented Programming
 
ReactJS
ReactJSReactJS
ReactJS
 
The redux saga begins
The redux saga beginsThe redux saga begins
The redux saga begins
 
Introducing Riak
Introducing RiakIntroducing Riak
Introducing Riak
 

Similaire à Rigor Scripting Guide: Best Practices for Building Multi-Step Real Browser Checks

HSC INFORMATION TECHNOLOGY CHAPTER 3 ADVANCED JAVASCRIPT
HSC INFORMATION TECHNOLOGY CHAPTER 3 ADVANCED JAVASCRIPTHSC INFORMATION TECHNOLOGY CHAPTER 3 ADVANCED JAVASCRIPT
HSC INFORMATION TECHNOLOGY CHAPTER 3 ADVANCED JAVASCRIPTAAFREEN SHAIKH
 
Introduction to Web Development.pptx
Introduction to Web Development.pptxIntroduction to Web Development.pptx
Introduction to Web Development.pptxAlisha Kamat
 
Introduction to Web Development.pptx
Introduction to Web Development.pptxIntroduction to Web Development.pptx
Introduction to Web Development.pptxGDSCVJTI
 
Introduction to Web Development.pptx
Introduction to Web Development.pptxIntroduction to Web Development.pptx
Introduction to Web Development.pptxAlisha Kamat
 
Introduction to Html5, css, Javascript and Jquery
Introduction to Html5, css, Javascript and JqueryIntroduction to Html5, css, Javascript and Jquery
Introduction to Html5, css, Javascript and Jqueryvaluebound
 
Cascading Style Sheets - Part 01
Cascading Style Sheets - Part 01Cascading Style Sheets - Part 01
Cascading Style Sheets - Part 01Hatem Mahmoud
 
Introduction of Html/css/js
Introduction of Html/css/jsIntroduction of Html/css/js
Introduction of Html/css/jsKnoldus Inc.
 
Webdev bootcamp
Webdev bootcampWebdev bootcamp
Webdev bootcampDSCMESCOE
 
Web Design & Development - Session 2
Web Design & Development - Session 2Web Design & Development - Session 2
Web Design & Development - Session 2Shahrzad Peyman
 
Web performance essentials - Goodies
Web performance essentials - GoodiesWeb performance essentials - Goodies
Web performance essentials - GoodiesJerry Emmanuel
 
SharePoint Cincy 2012 - jQuery essentials
SharePoint Cincy 2012 - jQuery essentialsSharePoint Cincy 2012 - jQuery essentials
SharePoint Cincy 2012 - jQuery essentialsMark Rackley
 
Implementing schema.org in the JSON-LD format with Google Tag Manager
Implementing schema.org in the JSON-LD format with Google Tag ManagerImplementing schema.org in the JSON-LD format with Google Tag Manager
Implementing schema.org in the JSON-LD format with Google Tag ManagerEoghan Henn
 
1. Advanced Web Designing (12th IT) (1).pdf
1. Advanced Web Designing (12th IT) (1).pdf1. Advanced Web Designing (12th IT) (1).pdf
1. Advanced Web Designing (12th IT) (1).pdfAAFREEN SHAIKH
 
IT2255 Web Essentials - Unit II Web Designing
IT2255 Web Essentials - Unit II  Web DesigningIT2255 Web Essentials - Unit II  Web Designing
IT2255 Web Essentials - Unit II Web Designingpkaviya
 

Similaire à Rigor Scripting Guide: Best Practices for Building Multi-Step Real Browser Checks (20)

HSC INFORMATION TECHNOLOGY CHAPTER 3 ADVANCED JAVASCRIPT
HSC INFORMATION TECHNOLOGY CHAPTER 3 ADVANCED JAVASCRIPTHSC INFORMATION TECHNOLOGY CHAPTER 3 ADVANCED JAVASCRIPT
HSC INFORMATION TECHNOLOGY CHAPTER 3 ADVANCED JAVASCRIPT
 
Introduction to Web Development.pptx
Introduction to Web Development.pptxIntroduction to Web Development.pptx
Introduction to Web Development.pptx
 
Introduction to Web Development.pptx
Introduction to Web Development.pptxIntroduction to Web Development.pptx
Introduction to Web Development.pptx
 
Introduction to Web Development.pptx
Introduction to Web Development.pptxIntroduction to Web Development.pptx
Introduction to Web Development.pptx
 
Introduction to Html5, css, Javascript and Jquery
Introduction to Html5, css, Javascript and JqueryIntroduction to Html5, css, Javascript and Jquery
Introduction to Html5, css, Javascript and Jquery
 
Cascading Style Sheets - Part 01
Cascading Style Sheets - Part 01Cascading Style Sheets - Part 01
Cascading Style Sheets - Part 01
 
Introduction of Html/css/js
Introduction of Html/css/jsIntroduction of Html/css/js
Introduction of Html/css/js
 
Webdev bootcamp
Webdev bootcampWebdev bootcamp
Webdev bootcamp
 
Overview of PHP and MYSQL
Overview of PHP and MYSQLOverview of PHP and MYSQL
Overview of PHP and MYSQL
 
Web Design & Development - Session 2
Web Design & Development - Session 2Web Design & Development - Session 2
Web Design & Development - Session 2
 
Web performance essentials - Goodies
Web performance essentials - GoodiesWeb performance essentials - Goodies
Web performance essentials - Goodies
 
Selectors Performance
Selectors PerformanceSelectors Performance
Selectors Performance
 
SharePoint Cincy 2012 - jQuery essentials
SharePoint Cincy 2012 - jQuery essentialsSharePoint Cincy 2012 - jQuery essentials
SharePoint Cincy 2012 - jQuery essentials
 
J query
J queryJ query
J query
 
UNIT 1 (7).pptx
UNIT 1 (7).pptxUNIT 1 (7).pptx
UNIT 1 (7).pptx
 
Implementing schema.org in the JSON-LD format with Google Tag Manager
Implementing schema.org in the JSON-LD format with Google Tag ManagerImplementing schema.org in the JSON-LD format with Google Tag Manager
Implementing schema.org in the JSON-LD format with Google Tag Manager
 
1. Advanced Web Designing (12th IT) (1).pdf
1. Advanced Web Designing (12th IT) (1).pdf1. Advanced Web Designing (12th IT) (1).pdf
1. Advanced Web Designing (12th IT) (1).pdf
 
jQuery
jQueryjQuery
jQuery
 
IT2255 Web Essentials - Unit II Web Designing
IT2255 Web Essentials - Unit II  Web DesigningIT2255 Web Essentials - Unit II  Web Designing
IT2255 Web Essentials - Unit II Web Designing
 
Angular JS
Angular JSAngular JS
Angular JS
 

Dernier

Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalPrecise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalLionel Briand
 
Large Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and RepairLarge Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and RepairLionel Briand
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsAhmed Mohamed
 
Post Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on IdentityPost Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on Identityteam-WIBU
 
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Natan Silnitsky
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commercemanigoyal112
 
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)jennyeacort
 
Powering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsPowering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsSafe Software
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceBrainSell Technologies
 
Odoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 EnterpriseOdoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 Enterprisepreethippts
 
VK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web DevelopmentVK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web Developmentvyaparkranti
 
What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...Technogeeks
 
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdf
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdfInnovate and Collaborate- Harnessing the Power of Open Source Software.pdf
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdfYashikaSharma391629
 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...confluent
 
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...OnePlan Solutions
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanyChristoph Pohl
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Cizo Technology Services
 
Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Rob Geurden
 
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptxReal-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptxRTS corp
 
Machine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringMachine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringHironori Washizaki
 

Dernier (20)

Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalPrecise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive Goal
 
Large Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and RepairLarge Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and Repair
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML Diagrams
 
Post Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on IdentityPost Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on Identity
 
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commerce
 
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
 
Powering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsPowering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data Streams
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. Salesforce
 
Odoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 EnterpriseOdoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 Enterprise
 
VK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web DevelopmentVK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web Development
 
What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...
 
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdf
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdfInnovate and Collaborate- Harnessing the Power of Open Source Software.pdf
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdf
 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
 
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
 
Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...
 
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptxReal-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
 
Machine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringMachine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their Engineering
 

Rigor Scripting Guide: Best Practices for Building Multi-Step Real Browser Checks

  • 1. Rigor Scripting Guide Best Practices, Conventions, & Helpful Tips for Building Multi- Step Real Browser Checks
  • 2. Selectors & Types What is a selector? Patterns used to select and identify items to interact with in the DOM Selector Types Rigor: ● id ● name ● css ● link ● xpath
  • 3. Selector Types id target the unique identifier of an element on the page
  • 4. name target an element with matching name attribute Selector Types
  • 5. xpath target an element in the DOM by using XML syntax Selector Types
  • 6. Selector Types css target an element by using HTML/CSS syntax ● selector
  • 7. Selector Types css target an element by using HTML/CSS syntax ● CSS path form > div.row-fluid > input[placeholder='email']
  • 8. Selector Types link target a link associated with an anchor tag (<a>) by specifying the anchor text
  • 9. Selector Type: CSS Path HTML Tag HTML Attributes CSS Combinators CSS Pseudo Classes 1 2 3 4
  • 10. HTML tags designate the element type. Common HTML tags: ● Heading: <h1>, <h2>,....,<h5>, <h6> ● Paragraph: <p> ● DIV: <div> ● Input: <input> ● Button: <button> ● Iframe: <iframe> CSS Path HTML Element/Tag HTML elements are written with a start tag, end tag, & content in between.
  • 11. ● HTML Attributes provide additional info about HTML elements ● Always specified in the start tag ● Attributes come in name='value' pairs CSS Path HTML Attribute Common HTML attributes: ● class ● href ● name ● style ● type HINT: always use single quotes ('single quotes') and turn Smart Quotes OFF
  • 12. 4 Different Combinators: 1. Descendant selector (space) 2. Child selector (>) 3. Adjacent sibling selector (+) 4. General sibling selector (~) Used to combine simple CSS selectors into a path. CSS Path Combinators "A combinator is something that explains the relationship between the selectors" -- W3Schools.ocm
  • 13. Used to define a special state of an element. Append to a simple CSS selector. Important Pseudo Classes for CSS Paths: ● :nth-child(index) ● :nth-of-type(index) CSS Path Pseudo Classes form > div:nth-child(2) > input
  • 14. CSS Path: Examples tag class attribute (name/value pair) combinator general syntax input[placeholder='Email' ] input.login-input[placeholder='Email' ] form > div.row-fluid > input[id='email'] #email (CSS version of id='email')
  • 15. Choosing a Selector ● use developer tools to interact with DOM (inspector) and JavaScript (console) to interact with elements of a site ● use 'command + f' in inspector to ensure that there is only one instance of the selector you are using ● id first, xpath last ● watch out for dynamic selectors Best Practices
  • 16. Real Browser: Check Steps Wait ● Wait for text present ● Wait for text not present ● Wait for element present ● Wait for element not present ● Wait for element visible ● Wait for element not visible Action ● Accept Alert ● Clear ● Click ● Dismiss Alert ● Fill in field ● Fill in password field ● Go to URL ● Run javascript ● Select ● Save text from Element ● Save return value from javascript ● Switch to iframe ● Switch to main
  • 17. Accept Alert When the JavaScript window.alert() or window.confirm() method is executed on a page, the "Accept Alert" action will accept this alert. RBC Steps - Action window.alert('This is a JavaScript alert'); window.confirm('Confirm this alert.');
  • 18. RBC Steps - Action Clear This action will clear the value of a specified element. ● text field ● radio ● checkbox ● dropdown
  • 19. RBC Steps - Action Click Emulates a click operation for any element on the page. Takes in a selector as an argument. div.hidden-phone > input[type='submit]
  • 20. RBC Steps - Action window.alert('This is a JavaScript alert'); Dismiss Alert When the JavaScript window.confirm() method is called, the "Dismiss Alert" action will reject the request and return false to the console.
  • 21. Fill in field Take a selector as an argument and specify a value. ● In some cases, you must precede the 'Fill in field' action with a 'Click' action.. RBC Steps - Action
  • 22. Fill in password field This action operates similarly to the "Fill in field" action, but will mask the input value in Rigor to protect passwords from non-admin users. RBC Steps - Action
  • 23. Run javascript Execute any javascript on the current page in the check; similar to what would be available in the browser console. RBC Steps - Action
  • 24. Select Select an item from a list by specifying a selector and a corresponding index, label, or value. RBC Steps - Action
  • 25. http://rigor.com/Features RBC Steps - Action Save text from element This action takes in a selector and saves the associated text value to a variable. Call this variable in a subsequent step by using the {{custom. your_variable_here}} tag.
  • 26. ?date=2/26/2016&q=30305 RBC Steps - Action Save return value from javascript Execute javascript and return a value that will be saved to a variable. Similar to the "Save text from element" step, you can call this variable in subsequent steps via the {{custom.your_variable_here}} tag. 1 2 Example: adding tomorrow’s date (2/26/2016) as a parameter to a URL)
  • 27. Switch to iframe Interact with the elements inside an iframe by specifying the iframe's corresponding selector. Once this step is run, the browser can interact with elements contained in the iframe. RBC Steps - Action
  • 28. Switch to main If you used the "Switch to iframe" step and need to jump out into the main page, use the "Switch to main" action. RBC Steps - Action
  • 29. Wait for text RBC Steps - Wait ● Present - scans the DOM searching for a text match. Will continue to the next step when the specified text is present. ● Not present - scans the DOM searching for a text match. If the specified text is present, the step will fail. If the text does not appear in the DOM the check will continue to the next step.
  • 30. ● Wait for element present - scans the DOM searching for an id, css, xpath, name, or link selector. Will continue to the next step in the check when the specified element is present. ● Wait for element not present - scans the DOM searching for an id, css, xpath, name, or link selector. If the element doe not appear in the DOM, the check will continue to the next step. Wait for element RBC Steps - Wait
  • 31. ● Wait for element visible - scans the page searching for an id, css, xpath, name, or link selector to be visible on the page. If an element is present in the DOM but not visible on the page, this step will fail. ● Wait for element not visible - scans the page searching for an id, css, xpath, name, or link selector that is not visible on the page. If this element is present in the DOM but not visible on the page, this step will pass. Wait for element RBC Steps - Wait