Setup for Automated Testing
Get set up for accessibility testing in iOS and Android with axe DevTools Mobile in Appium.
Requires:
- Your tests running against Appium version 2.0 or above
- API Key for the axe DevTools Mobile Dashboard
- Use of UiAutomator2 or XCUITest Driver
- Node.js v.20 or above
First Time Setup
Configure npm for accessing axe DevTools Mobile
The axe DevTools Mobile Appium drivers are available through Deque's Artifactory as an npm package. As such, you'll need to add your credentials to an ~/.npmrc
file. Follow our guide for setting up your npm registry to access axe DevTools Mobile.
Install the Drivers
Install the required drivers to your Appium instance through the command line:
axe XCUITest Driver for iOS Testing
appium driver install --source=npm @axe-devtools/axe-appium-xcuitest-driver
If you need to uninstall at any time, you can uninstall through the command line:
appium driver uninstall axexcuitest
axe UIAutomator2 Driver for Android Testing
appium driver install --source=npm @axe-devtools/axe-appium-uiautomator2-driver
If you need to uninstall at any time, you can uninstall through the command line:
appium driver uninstall axeuiautomator2
Optional: Configure iOS Driver for Real Devices
Running Appium tests on real iOS devices requires some additional setup because axe DevTools for Mobile utilizes WebDriverAgent (WDA).
Our WebDriverAgent Xcode project's default path is:\
~/.appium/node_modules/@axe-devtools/axe-appium-xcuitest-driver/node_modules/@axe-devtools/axe-appium-webdriveragent/WebDriverAgent.xcodeproj
.
You can run appium driver run axexcuitest open-wda
in the terminal to open the WDA XCode project.
You can use the XCUITest Driver Real Device Configuration guide from Appium to get started, but keep in mind their default path to WDA is different than ours.
What's Next?
After you have installed the axe DevTools Mobile Appium drivers, you are all set to scan your mobile app. Optionally, you can customize your configuration before you scan, using our APIs to name your scans, ignore certain results, tag scans and more.