Installation

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

Install Axe Watcher for automated accessibility testing in JavaScript, TypeScript, or Java

Not for use with personal data

Axe Watcher integrates accessibility testing into your existing end-to-end test suites. This guide covers installation for both the JavaScript/TypeScript and Java versions of the package.

System Requirements

Before installing Axe Watcher, ensure your environment meets these requirements:

  • Language support: Your tests must be written in JavaScript, TypeScript, or Java.

  • Node.js (JavaScript/TypeScript only): Use the Long Term Support (LTS) version of Node.js.

  • Browser automation platform versions: Axe Watcher supports the latest version or the previous major version of each supported platform (except for Playwright and Playwright Test, which is the previous minor version and later).

  • Browser: Watcher uses the latest stable version of Chrome for Testing or Chromium. Note that Cypress's built-in Electron browser is not compatible with Watcher, and you'll need to invoke Cypress with cypress run --browser chrome-for-testing --headless or cypress run --browser chromium --headless.

  • npm registry access (JavaScript/TypeScript only): Your environment must have permission to download and install packages from The npm Registry.

  • Maven Central repository access (Java only): Your environment must have permission to download and install packages from Maven Central.

  • Git repository (optional but recommended): Using Git allows you to associate accessibility results with specific commits and monitor your project's accessibility progress over time.

JavaScript and TypeScript Installation

The @axe-core/watcher package is available on npm. Install it in the root level of your testing folder using your preferred package manager:

npm install --save-dev @axe-core/watcher

Or with yarn:

yarn add --dev @axe-core/watcher

Or with pnpm:

pnpm add --save-dev @axe-core/watcher

Supported Platforms

The JavaScript/TypeScript package supports these browser automation platforms (current version and one major version back):

  • Cypress (including component testing)
  • Playwright (previous minor version and later are supported)
  • Playwright Test (previous minor version and later are supported)
  • Puppeteer
  • WebdriverIO
  • WebdriverIO Testrunner
  • WebDriverJS (Selenium)

After installation, follow the JavaScript or TypeScript framework-specific instructions in the Axe Watcher documentation to configure your test suite.

Java Installation

The Java Watcher package is available on Maven Central. Add the dependency to your pom.xml:

<dependencies>
  <dependency>
    <groupId>com.deque.axe_core</groupId>
    <artifactId>watcher</artifactId>
    <version>4.0.0</version>
  </dependency>
</dependencies>

Update the version number as needed to use the latest release. More information on the package's available versions can be found on Maven Central.

Supported Platforms

The Java package supports Selenium WebDriver (the current version and the previous major version).

Next Steps

Once you've installed the package, you'll need to:

  1. Create a project in Axe Developer Hub to obtain your project ID
  2. Modify your test suite according to the instructions for your specific testing framework
  3. Set your ACCESSIBILITY_API_KEY and PROJECT_ID as environment variables
  4. Run your tests and view results in Axe Developer Hub

For detailed setup instructions specific to your testing framework, see the framework-specific documentation pages.