Run a Scan
Ready, set, scan
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, passing in axeScan and the settings object.
driver.execute('mobile: axeScan', settings)Input
| Param | Type | Description |
|---|---|---|
| settings | Object |
Includes the authentication and configuration for axe DevTools Mobile. (See Authentication Keys in Settings for required keys). |
Authentication Keys in Settings
If you have not initialized a session with the driver, you will need to provide one of the following in the settings object to authenticate the scan.
| 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. |
| licenseKey | String |
Required by Deque to provide access to authorized users for offline scans. Please reach out to your Deque representative or contact support to coordinate the delivery of your license key. |
Configuration Keys in Settings
If you wish to customize your testing configuration, you can add any of the optional keys below to the settings object. Find more details about these properties in Customize Your Configuration.
| 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. The default value is true. |
You may consider adding a utility function to your testing script as a central place to initiate an accessibility scan.
