API Reference

Link to API Reference copied to clipboard

APIs used to scan and handle results returned from scans

Not for use with personal data

Scan and Handle Results

Use the following APIs to scan your app and handle the results. You can find all of the library's public classes and functions in the complete API Reference.

scan()

Scans the information collected by the instrumentation registry object passed into setInstrumentation(param) for issues and returns a ScanResultHandler.

Returns:

Name Type Description
ScanResultHandler Nullable ScanResultHandler provides a way to get more detailed information on the result or further update the scan by providing a name or tags.

getResult(param)

Requests a scan's result from the dashboard matching the provided result key.

Required param:

Name Type Description
axeDevToolsResultKey AxeDevToolsResultKey The identifier of the result you'd like to grab.

Returns:

Type Description
AxeDevToolsResult Nullable AxeDevToolsResult provides access to details of the result.

deleteResult(param)

Delete a scan's result from the dashboard matching the provided result key.

Required param:

Name Type Description
axeDevToolsResultKey AxeDevToolsResultKey The identifier of the result you'd like to grab.

tearDown()

Resets tags and clears test state from prior testing.

ScanResultHandler

uploadToDashboard(param)

Upload the accessibility scan's result to the dashboard. By default, the full result object is returned.

Optional param:

Name Type Description
uploadOnly Boolean Optional, default is false. When set to true, the result is uploaded to the dashboard and the result key is only available within the AxeDevToolsResult object.

Returns:

Type Description
AxeDevToolsResult Nullable AxeDevToolsResult provides access to details of the result.

saveResultToLocalStorage(param)

Save the accessibility scan result to a local file on your test device.

Required param:

Name Type Description
prefixFilename String Beginning of the filename to save the result as.

getSerializedResult()

Grabs the result of your scan to use within the test.