Download the WebDriverJS Demo Project
Clone and run a complete sample project for Axe DevTools for Web with WebDriverJS and Mocha
The Examples Catalog provides a complete WebDriverJS sample project that you can clone and run to generate accessibility reports without needing an existing web project to integrate with. For information on how to install Axe DevTools for Web into an existing project, read the guide on installing from a bundle, from your own artifact repository, or from Deque's Agora.
Prerequisites
This project requires a Node.js development environment. It also requires WebDriverJS as a peer dependency.
You also need access to Deque's Agora artifact repository to install the Axe DevTools packages. See Install Axe DevTools for Web for WebDriverJS from Deque's Agora for instructions on setting up access.
Use
-
Clone the Deque Examples Catalog repository on GitHub:
git clone git@github.com:dequelabs/axe-devtools-html-api-examples.gitnoteYou might need to use a different clone command depending on how you have set up access to GitHub. The above command uses SSH. See Connecting to GitHub with SSH for more information.
-
Navigate to the WebDriverJS example:
cd axe-devtools-html-api-examples/Node/webdriverjs-mocha -
Run
npm installto install the dependencies -
Run
npm testto run the test scripts
Once the tests have finished running, the results are compiled into an HTML report by the Axe DevTools for Web reporter. These reports allow you to easily consume the results of the accessibility scans.
If desired, you can configure the project to scan any web addressable page by changing the test case URLs in the test files and re-running the tests.
Configuration
Initially, one or more of the components within this project may be incompatible with your environment. If issues persist, contact your Deque representative directly, reach us via our support desk, or send us an email. We'll be happy to help.
