Run a Scan

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
Not for use with personal data

Start Accessibility Testing Through Appium

Start the Appium server as normal:

appium

Configure Your Tests

From your Appium automation scripts, add the capabilities required for axe DevTools Mobile for the platform under test:

Required Android Capability:

Name Type Description
automationName String Set to 'AxeUiAutomator2' to utilize the driver with axe DevTools Mobile embedded to run accessibility scans.
appPackage String The application package of the app under test. Note that appPackage is a part of the UiAutomator2 driver; you may already have it set.

Required iOS Capability:

Name Type Description
automationName String Set to 'AxeXCUITest' to utilize the driver with axe DevTools Mobile embedded to run accessibility scans.
bundleId String The bundle identifier of the app under test. Note that bundleId is a part of the XCUITest driver; you may already have it set.

Scan for Accessibility Issues

Now with the Appium server running and your testing configuration set, you're ready to start scanning your mobile app.

The accessibility scan can be activated at any point in your tests. When you're ready to kick off an accessibility scan, call the Execute Script API.

execute_script("mobile: axeScan", settings)

Input

Param Type Description
Settings Object Includes the required configurations for axe DevTools Mobile. (See Required Keys in Settings).

Required Keys in Settings

Key Type Description
apiKey String Required by Deque to provide access to authorized users. Access your axe DevTools Mobile API Key in the axe Account portal.

Optional Keys in Settings

Key Type Description
scanName String Provide a customized scan name to better identify scans within the dashboard.
tags [String] Provide an array of strings to apply to scans as tags. We recommend using tags to help you locate and group essential scans. Tagged scans are available to other team members.
ignoreRules [String] Provide an array of strings to apply a list of rules to ignore on all views. Each string in the array should be a valid ruleId - for example, ColorContrast. Find ruleIds inside of the axeConf object in the JSON result for any scan.
ignoreExperimental Boolean When this parameter is set to true, experimental rule(s) will be ignored. The default value is false.
uploadToDashboard Boolean When this parameter is set to false, the scan will not be uploaded to the dashboard. The default value is true.
tip

You may consider adding a utility function to your testing script as a central place to initiate an accessibility scan.