Download the Puppeteer Demo Project

This page is not available in the language you requested. You have been redirected to the English version of the page.
Link to this page copied to clipboard

Download and run a complete sample project for Axe DevTools for Web with Puppeteer and Mocha

Not for use with personal data

This demo project familiarizes users with using Axe DevTools for Web with Puppeteer and Mocha and can generate 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

These projects require a Node.js development environment including NPM or Yarn. They also require a WebDriver matching the desired demo project, either Puppeteer, WebdriverIO, or WebDriverJS

Examples Catalog

The Examples Catalog provides a complete Puppeteer with Mocha sample project that you can clone and run to generate accessibility reports without needing an existing web project to integrate with.

Use

  1. Clone the Deque Examples Catalog repository on GitHub:

    git clone git@github.com:dequelabs/axe-devtools-html-api-examples.git
    note

    You 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.

  2. Navigate to the Puppeteer example:

    cd axe-devtools-html-api-examples/Node/puppeteer-mocha
  3. Run npm install or yarn to install the node modules

  4. Run npm test or yarn test to run the test scripts

Once the tests have finished running, the raw results are logged to the console as well as 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 with src/*.test.js 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.