SlideShare a Scribd company logo
Selenium With Axe
Using Axe to Add Accessibility Checks
to Your Existing Selenium Tests
Troy Walsh
October 2020
22
» What is accessibility
› Making user interfaces Perceivable, Operable, and Understandable
by people with a wide range of abilities
» Why should I care
› You kind of have to - Domino’s Pizza v. Guillermo Robles, No. 18-1539
› It’s good for business
› Trivial amount of work to add to your Selenium test suite
» How do I know if something is accessible
› Web Content Accessibility Guidelines (WCAG)
› https://www.w3.org/TR/2018/REC-WCAG21-20180605/
» What tool(s) should I use
› There are a lot solid options such as Wave, Pa11y, etc. - We will focus on Axe
Context
33
» Open source
» Really good at not returning false positives
» Highly configurable
» Works with all major modern browsers
» Works with things like IFrames
» Integrates with existing browser-based tests
» Extensive and detailed WCAG documentation
» *It’s what I use/support
Why Axe
44
» Basically just some JavaScript
*Axe-Core
» Runs in browser
› Chrome, Firefox, Safari, Edge and IE
» Crawls the entire DOM
› Including IFrames
» Compare web page elements to predefined rules
› Up to WCAG 2.1
» JSON result format
› *This is kind of why you want a library
What is Axe Exactly
55
» Try the browser extension first
› Web Accessibility Testing
› Accessibility Insights for Web
» Get to know the API
› https://www.deque.com/axe/axe-for-web/documentation/api-documentation/
» Find the extension that works for you
› Java, Ruby, Python, C#, JavaScript
› We will be using https://www.nuget.org/packages/Selenium.Axe/
How To Get Started
66
» Add an Axe library to your Selenium tests
› https://www.nuget.org/packages/Selenium.Axe/
› https://search.maven.org/artifact/com.deque.html.axe-core/selenium/4.0.0/jar
› https://www.npmjs.com/package/axe-webdriverjs
» Navigate to your page
» Create an AxeBuilder *Optional
» Set any options and/or rules *Optional
» Run the analyzer
› Uses Selenium to run the Axe-Core JS
› Axe-Core JS return results in a JSON format
» Report results
Adding Axe to Your Automation
77
» Analyze current page
» Analyze sub page
The Basics - Code
88
» Builder
› Run options
› Tags
› Rules
› Context (CSS)
− Include and Exclude
› Reporting
» Analyze
› Global or targeted
Low-Level Control
99
» Metadata
› TestEngine, TestRunner, TestEnvironment, Timestamp,
Url, ToolOptions and *Error
» Test results
› Violations
− Accessibility checks that don’t adhere to the current standard
› Passes
− Accessibility checks that adhere to the current standard
› Incomplete
− May or may not adhere to the current standard
*AKA Human makes the call
› Inapplicable
− Accessibility checks that don’t apply to the given element
Axe Results
1010
» Impact
› "minor", "moderate", "serious", or "critical"
› *null if no violation was found
» Tags
› What rules the check applies to
» Description and help
› User friendly messages and links
» Nodes
› Html
› Selector(s)
› Failure summary
Individual Test Results
1111
Demo/Hands-on
https://github.com/TroyWalshProf/AccessibilityDemo
1212
Questions
877.277.1044 / magenic.com // 13
THANK YOU
877.277.1044 / magenic.com // 13
THANK YOU

More Related Content

PPT
BasicChristianCommunities 1
PDF
The principles of front and back doors in your church
DOCX
A handbook for parish pastoral councils
PDF
Confluent Tech Talk Korea
PPTX
10 Useful Testing Tools for Open Source Projects @ TuxCon 2015
PPTX
Continuous Delivery - Automate & Build Better Software with Travis CI
PDF
KrishnaToolComparisionPPT.pdf
PPTX
Selenium – Web Browser Automation
BasicChristianCommunities 1
The principles of front and back doors in your church
A handbook for parish pastoral councils
Confluent Tech Talk Korea
10 Useful Testing Tools for Open Source Projects @ TuxCon 2015
Continuous Delivery - Automate & Build Better Software with Travis CI
KrishnaToolComparisionPPT.pdf
Selenium – Web Browser Automation

Similar to Using Axe to Add Accessibility Checks to Your Existing Selenium Tests (20)

PPTX
Basics of selenium containing features of selenium
PPT
Selenium for everyone
PPTX
Automation solution using jbehave, selenium and hudson
PDF
Create an architecture for web test automation
PPTX
Axe-matchers gem for automated accessibility testing
PPTX
1,2,3 … Testing : Is this thing on(line)? with Mike Martin
PPTX
Browser Automated Testing Frameworks - Nightwatch.js
PDF
How To Use Selenium Successfully (Java Edition)
PPTX
Automated Acceptance Testing from Scratch
PDF
Deep Dive Into NightWatch- Workshop by Pallavi Sharma.pdf
PPTX
Untying the Knots of Web Dev with Internet Explorer
PPTX
A Sampling of Tools
PDF
Getting Started with Selenium
PPTX
Structured Functional Automated Web Service Testing
PDF
Accessibility Testing - Using Asqatasun - Meetup Webinar
PPTX
Best Practices for WordPress in Enterprise
PDF
Best practices-wordpress-enterprise
PPTX
Selenium Basics and Overview topics.pptx
PPTX
Selenium Basics and Overview1233444.pptx
PDF
Node.js Development Workflow Automation with Grunt.js
Basics of selenium containing features of selenium
Selenium for everyone
Automation solution using jbehave, selenium and hudson
Create an architecture for web test automation
Axe-matchers gem for automated accessibility testing
1,2,3 … Testing : Is this thing on(line)? with Mike Martin
Browser Automated Testing Frameworks - Nightwatch.js
How To Use Selenium Successfully (Java Edition)
Automated Acceptance Testing from Scratch
Deep Dive Into NightWatch- Workshop by Pallavi Sharma.pdf
Untying the Knots of Web Dev with Internet Explorer
A Sampling of Tools
Getting Started with Selenium
Structured Functional Automated Web Service Testing
Accessibility Testing - Using Asqatasun - Meetup Webinar
Best Practices for WordPress in Enterprise
Best practices-wordpress-enterprise
Selenium Basics and Overview topics.pptx
Selenium Basics and Overview1233444.pptx
Node.js Development Workflow Automation with Grunt.js
Ad

More from Sauce Labs (20)

PDF
Simplify Salesforce Testing with AI-Driven Codeless Tools
PDF
Testing on Mobile Devices with Location Services
PDF
Your Framework for Success: introduction to JavaScript Testing at Scale
PDF
Automating Hybrid Applications with Appium
PDF
Quality at Speed: More API Testing, Less UI Testing
PPTX
Creating Digital Confidence with Test Automation
PDF
Just Enough (Automated) Testing
PDF
How Open Source Helps to Bring Back Product Obsession
PDF
Webinar: A Sneak Peek at Selenium 4 with Simon Stewart
PDF
[Deu] Test Automatisierung Mit Web Driver.io
PDF
Accelerating Innovation: Leveraging Open Source to Optimize Your Shift-Left I...
PDF
Accelerating Your Digital Agenda with Continuous Testing ft. Forrester
PDF
How to Measure Success in Continuous Testing
PDF
From Zero to 2.7 Million - How Verizon Media Embraced Open Source to Accelera...
PDF
5 Steps to Jump Start Your Test Automation
PDF
Sauce Labs Webinar: Rising Importance of Software Testing
PDF
BDD With Selenide by Hima Bindu Peteti
PDF
Closer To the Metal - Why and How We Use XCTest and Espresso by Mario Negro P...
PDF
Continuous Delivery for "Mature" Codebases by Melisa Benua
PDF
Building Automation Engineers From Scratch by Jenny Bramble
Simplify Salesforce Testing with AI-Driven Codeless Tools
Testing on Mobile Devices with Location Services
Your Framework for Success: introduction to JavaScript Testing at Scale
Automating Hybrid Applications with Appium
Quality at Speed: More API Testing, Less UI Testing
Creating Digital Confidence with Test Automation
Just Enough (Automated) Testing
How Open Source Helps to Bring Back Product Obsession
Webinar: A Sneak Peek at Selenium 4 with Simon Stewart
[Deu] Test Automatisierung Mit Web Driver.io
Accelerating Innovation: Leveraging Open Source to Optimize Your Shift-Left I...
Accelerating Your Digital Agenda with Continuous Testing ft. Forrester
How to Measure Success in Continuous Testing
From Zero to 2.7 Million - How Verizon Media Embraced Open Source to Accelera...
5 Steps to Jump Start Your Test Automation
Sauce Labs Webinar: Rising Importance of Software Testing
BDD With Selenide by Hima Bindu Peteti
Closer To the Metal - Why and How We Use XCTest and Espresso by Mario Negro P...
Continuous Delivery for "Mature" Codebases by Melisa Benua
Building Automation Engineers From Scratch by Jenny Bramble
Ad

Recently uploaded (20)

PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
GDG Cloud Iasi [PUBLIC] Florian Blaga - Unveiling the Evolution of Cybersecur...
PDF
Modernizing your data center with Dell and AMD
PDF
solutions_manual_-_materials___processing_in_manufacturing__demargo_.pdf
PDF
madgavkar20181017ppt McKinsey Presentation.pdf
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Sensors and Actuators in IoT Systems using pdf
PDF
Transforming Manufacturing operations through Intelligent Integrations
PPT
Teaching material agriculture food technology
PPTX
MYSQL Presentation for SQL database connectivity
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
Machine learning based COVID-19 study performance prediction
PDF
Empathic Computing: Creating Shared Understanding
PDF
Electronic commerce courselecture one. Pdf
PDF
KodekX | Application Modernization Development
Dropbox Q2 2025 Financial Results & Investor Presentation
GDG Cloud Iasi [PUBLIC] Florian Blaga - Unveiling the Evolution of Cybersecur...
Modernizing your data center with Dell and AMD
solutions_manual_-_materials___processing_in_manufacturing__demargo_.pdf
madgavkar20181017ppt McKinsey Presentation.pdf
Advanced methodologies resolving dimensionality complications for autism neur...
Diabetes mellitus diagnosis method based random forest with bat algorithm
Reach Out and Touch Someone: Haptics and Empathic Computing
Sensors and Actuators in IoT Systems using pdf
Transforming Manufacturing operations through Intelligent Integrations
Teaching material agriculture food technology
MYSQL Presentation for SQL database connectivity
Understanding_Digital_Forensics_Presentation.pptx
The Rise and Fall of 3GPP – Time for a Sabbatical?
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Machine learning based COVID-19 study performance prediction
Empathic Computing: Creating Shared Understanding
Electronic commerce courselecture one. Pdf
KodekX | Application Modernization Development

Using Axe to Add Accessibility Checks to Your Existing Selenium Tests

  • 1. Selenium With Axe Using Axe to Add Accessibility Checks to Your Existing Selenium Tests Troy Walsh October 2020
  • 2. 22 » What is accessibility › Making user interfaces Perceivable, Operable, and Understandable by people with a wide range of abilities » Why should I care › You kind of have to - Domino’s Pizza v. Guillermo Robles, No. 18-1539 › It’s good for business › Trivial amount of work to add to your Selenium test suite » How do I know if something is accessible › Web Content Accessibility Guidelines (WCAG) › https://www.w3.org/TR/2018/REC-WCAG21-20180605/ » What tool(s) should I use › There are a lot solid options such as Wave, Pa11y, etc. - We will focus on Axe Context
  • 3. 33 » Open source » Really good at not returning false positives » Highly configurable » Works with all major modern browsers » Works with things like IFrames » Integrates with existing browser-based tests » Extensive and detailed WCAG documentation » *It’s what I use/support Why Axe
  • 4. 44 » Basically just some JavaScript *Axe-Core » Runs in browser › Chrome, Firefox, Safari, Edge and IE » Crawls the entire DOM › Including IFrames » Compare web page elements to predefined rules › Up to WCAG 2.1 » JSON result format › *This is kind of why you want a library What is Axe Exactly
  • 5. 55 » Try the browser extension first › Web Accessibility Testing › Accessibility Insights for Web » Get to know the API › https://www.deque.com/axe/axe-for-web/documentation/api-documentation/ » Find the extension that works for you › Java, Ruby, Python, C#, JavaScript › We will be using https://www.nuget.org/packages/Selenium.Axe/ How To Get Started
  • 6. 66 » Add an Axe library to your Selenium tests › https://www.nuget.org/packages/Selenium.Axe/ › https://search.maven.org/artifact/com.deque.html.axe-core/selenium/4.0.0/jar › https://www.npmjs.com/package/axe-webdriverjs » Navigate to your page » Create an AxeBuilder *Optional » Set any options and/or rules *Optional » Run the analyzer › Uses Selenium to run the Axe-Core JS › Axe-Core JS return results in a JSON format » Report results Adding Axe to Your Automation
  • 7. 77 » Analyze current page » Analyze sub page The Basics - Code
  • 8. 88 » Builder › Run options › Tags › Rules › Context (CSS) − Include and Exclude › Reporting » Analyze › Global or targeted Low-Level Control
  • 9. 99 » Metadata › TestEngine, TestRunner, TestEnvironment, Timestamp, Url, ToolOptions and *Error » Test results › Violations − Accessibility checks that don’t adhere to the current standard › Passes − Accessibility checks that adhere to the current standard › Incomplete − May or may not adhere to the current standard *AKA Human makes the call › Inapplicable − Accessibility checks that don’t apply to the given element Axe Results
  • 10. 1010 » Impact › "minor", "moderate", "serious", or "critical" › *null if no violation was found » Tags › What rules the check applies to » Description and help › User friendly messages and links » Nodes › Html › Selector(s) › Failure summary Individual Test Results
  • 13. 877.277.1044 / magenic.com // 13 THANK YOU 877.277.1044 / magenic.com // 13 THANK YOU