Install Axe DevTools for Web for Node.js from Deque's Agora

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

Installing Axe DevTools Node.js packages from Deque's Agora artifact repository

Not for use with personal data

For customers who do not have an internal artifact repository and desire a more sustainable and scalable solution for installation than directly downloading Axe DevTools, Deque makes its own artifact repository available to select customers. This guide covers installing any of the Axe DevTools Node.js packages from Deque's Agora artifact repository. For information on other ways to install Axe DevTools, see the guide on Installing from your Artifact Repository.

Prerequisites

In order to install Axe DevTools from Agora, you must have Agora login credentials. Additionally, you must have an existing Node.js based web project to install Axe DevTools within. Depending on the configuration of your testing environment, your testing library (for example, Cypress, Playwright, Puppeteer, WebdriverIO, or WebDriverJS) may be required as an additional dependency.

Creating an Identity Token

The simplest way to create an Identity Token is through the Agora webapp. Once logged in, you can create an Identity Token by clicking the button labeled Welcome your-email-address in the top bar next to the help button. From there, you can create and copy your Identity Token.

important

Remember to copy your Identity Token's value when creating it, as this will be your only opportunity. Otherwise, you'll have to create a new token.

Identity Tokens expire (usually after a year), so you'll need to recreate your token periodically.

Adding Authentication

To access Axe DevTools packages through NPM or Yarn, you will need to add your Agora authentication information to a ~/.npmrc file. The Configuring Access to Agora packages tool can generate this .npmrc content for you from your Agora email and Identity Token. Otherwise, the simplest way to do this manually is with a curl command.

curl -u"<your-email>":<your-identity-token> "https://agora.dequecloud.com/artifactory/api/npm/auth"

When executing this command, replace with your Agora login email, and replace with the Identity Token you copied in the previous step. The return of the command should look like this:

_auth = <generated-auth-string>
always-auth = true
email = <your-email>

Setting up your .npmrc file (yarn/npm)

Open your ~/.npmrc file for editing. Add the registry information first, then add the output from the curl command. The final product should look like this:

@axe-devtools:registry=https://agora.dequecloud.com/artifactory/api/npm/devtools-npm/
//agora.dequecloud.com/artifactory/api/npm/devtools-npm/:_auth=<generated-auth-string>
//agora.dequecloud.com/artifactory/api/npm/devtools-npm/:email=<your-email@email.com>
//agora.dequecloud.com/artifactory/api/npm/devtools-npm/:always-auth=true

Setting up your .yarnrc.yml file (yarn modern)

Open your ~/.yarnrc.yml file for editing. Add the registry information first, then add the output from the curl command. The final product should look like this:

npmScopes:
  axe-devtools:
      npmRegistries: 'https://agora.dequecloud.com/artifactory/api/npm/dequelabs/':
      npmAuthIdent: <generated-auth-string>
      npmRegistryServer: 'https://agora.dequecloud.com/artifactory/api/npm/dequelabs/'
      npmAlwaysAuth: true

If you are unable to execute curl commands, you can generate your auth string by base-64 encoding <your-email>:<your-identity-token> and adding the product to the ~/.npmrc file the same way as if were generated with the curl command.

Installing

Once authentication is set up, install the package for your testing library.

Browser JavaScript (@axe-devtools/browser)

npm install @axe-devtools/browser

Once installed, read the guide on importing and initializing.

Cypress (@axe-devtools/cypress)

npm install @axe-devtools/cypress

If you haven't installed Cypress itself yet, you can install it with the command

npm install cypress

Playwright (@axe-devtools/playwright)

npm install @axe-devtools/playwright

If you haven't installed Playwright itself yet, you can install it with the command

npm install playwright

Once installed, read the guide on importing and initializing.

Puppeteer (@axe-devtools/puppeteer)

npm install @axe-devtools/puppeteer

If you haven't installed Puppeteer itself yet, you can install it with the command

npm install puppeteer

Once installed, read the guide on importing and initializing.

WebdriverIO (@axe-devtools/webdriverio)

npm install @axe-devtools/webdriverio

Once installed, read the guide on importing and initializing.

WebDriverJS (@axe-devtools/webdriverjs)

npm install @axe-devtools/webdriverjs

Once installed, read the guide on importing and initializing.

Next Steps

If you have issues installing Axe DevTools, contact your Deque representative directly, ask us via our support desk, or send us an email. We'll be happy to help you get up and running.