Register |  Login

WAVE Testing Engine Documentation

Usage Instructions

Embed the WAVE engine script (typically api.min.js) within the web page (or parent web page) to be tested. The script must be processed within a web page in a rendered browser context/DOM - headless browser contexts, such as Selenium, Chrome Driver, or Puppeteer are supported. Selenium Web Driver files (JavaScript) and Puppeteer scripts are available.

Define testing scope

You can scope the evaluation to a particular page element by setting wave.page, for example:
wave.page = document.getElementById("idOfElementToBeTested");

This can allow analysis of a distinct page element. If wave.page is not set, the entire page document will be evaluated. If wave.page is set to anything other than the document, WAVE will return errors for things like missing page title, etc. because these don't exist for a non-document element.

Initiate testing engine

Initiate the evaluation with:
wave.init();
This function can be called via the browser Console in DevTools or via a separate script.

Use wave.init(3) to include XPath values or wave.init(4) to include CSS selectors. Calling wave.init() gives counts and item details. The locator options match the reporttype values in the API documentation.

Parse WAVE results

A wave.results object is created with all of the WAVE data for you to handle.

Reset WAVE Engine

If you want to test the same page or page element again (without reloading the page/script), then reset everything before re-initiating the engine with:
wave.engine.fn.resetEngine();

Terms of Use

By licensing or testing the WAVE Accessibility Tool stand-alone online web service, API, and/or related systems (hereafter referred to as WAVE), you acknowledge that you have read, understood, and agree to be bound by the WAVE Terms of Use for your license or trial software.