axe DevTools Mobile integration with Appium
Prerequisites
-
Access to Digital.ai Testing
-
Application (APK / IPA) uploaded to the Application Manager
-
API Key for axe DevTools Mobile
-
Appium Tests running against Appium Version 2.11.3 or above
Digital.ai Testing integrates with axeDevTools for Mobile to help incorporate accessibility testing into your regular automation test workflows. Adding accessibility scans to your Appium Tests can help to capture important accessibility gaps within your applications. Let’s take a look at a simple Appium Test setup that would invoke accessibility scanning:
axe DevTools® for Mobile enables automated accessibility testing directly in your Appium workflows for both Android and iOS apps. A Deque Account with a subscription to axe DevTools® for Mobile is required.
Axe drivers are supported from Appium version 2.16.2
For Android:
@BeforeMethod
public void setUp() throws MalformedURLException {
desiredCapabilities.setCapability("accessKey", ACCESS_KEY); // Digital.ai's Access Key
desiredCapabilities.setCapability("deviceQuery", "@os='android'");
desiredCapabilities.setCapability("appium:automationName", "AxeUiAutomator2");
desiredCapabilities.setCapability("app", "cloud:com.experitest.ExperiBank/.LoginActivity");
desiredCapabilities.setCapability("appPackage", "com.experitest.ExperiBank");
desiredCapabilities.setCapability("appActivity", ".LoginActivity");
desiredCapabilities.setCapability("appiumVersion", "2.16.2");
driver = new AndroidDriver(new URL("https://<your_cloud_url>/wd/hub"), desiredCapabilities);
Map<String, Object> settings = new HashMap<>();
List<String> tags = new ArrayList<>();
settings.put("apiKey", API_KEY); // axe DevTools API Key
settings.put("scanName", "Axe driver"); // a customized scan name to better identify scans within the dashboard.
settings.put("tags", tags); // an array of strings to apply to scans as tags.
driver.executeScript("mobile: axeScan", settings);
}
For iOS:
Supported from Cloud version 25.3
@BeforeMethod
public void setUp() throws MalformedURLException {
desiredCapabilities.setCapability("accessKey", ACCESS_KEY); // Digital.ai's Access Key
desiredCapabilities.setCapability("deviceQuery", "@os='ios'");
desiredCapabilities.setCapability("appium:automationName", "AxeXCUITest");
desiredCapabilities.setCapability("app", "cloud:com.experitest.ExperiBank");
desiredCapabilities.setCapability("bundleId", "com.experitest.ExperiBank");
desiredCapabilities.setCapability("appiumVersion", "2.16.2");
driver = new IOSDriver<>(new URL("https://<your_cloud_url>/wd/hub"), desiredCapabilities);
Map<String, Object> settings = new HashMap<>();
List<String> tags = new ArrayList<>();
settings.put("apiKey", API_KEY); // axe DevTools API Key
settings.put("scanName", "Axe driver"); // a customized scan name to better identify scans within the dashboard.
settings.put("tags", tags); // an array of strings to apply to scans as tags.
driver.executeScript("mobile: axeScan", settings);
}
While this example is in Java, we support multiple languages. To learn more, head to our Quick Start Projects page on GitHub.
To see the accessibility results, head to axe DevTools Mobile dashboard.
View the accessibility results
Scan results are available in two places. Reporter is the recommended starting point, because the accessibility findings sit alongside the rest of the data for that test execution — video, logs, device details, and test steps.
In Reporter
Every scan generated during an execution appears on the Accessibility Scans tab of that
execution's report, listed by the scanName you passed in the scan settings. From there you can:
- Open the generated Axe report — detected issues, affected elements, severity levels, and Deque's remediation guidance.
- Download the report package as a
.zipof JSON result files and HTML reports, for offline review or analysis in other tools. - Share the results by public URL, so anyone with access to the shared execution report can view and download them.
For the full walkthrough, see Accessibility Scans in Reporter.
A single execution can hold several scans — after page load, after an interaction, after scrolling.
Give each one a descriptive scanName, such as login-screen or after-scroll, so the tab is
readable. The code samples above use "Axe driver" as a placeholder.
In the axe DevTools Mobile dashboard
Results are also sent to your Deque account and can be viewed in the axe DevTools Mobile dashboard. Use this when you want to review accessibility trends across projects in Deque's own tooling, or when your accessibility team works primarily there.
The scanName and tags you pass to mobile: axeScan are what identify your scans in the
dashboard.
Code sample
The examples above are in Java. For a complete, runnable project — device selection by
deviceQuery, parallel execution, and helpers that write each scan summary into the Digital.ai
report — see the
Automated Accessibility Testing sample
on GitHub.
Help and Feedback
Help
If you didn’t find what you were looking for in our documentation and need help, reach out to our Support Team.
Feedback
If there are product ideas you’d like to submit for us to consider, head to our Ideas Space.