Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RDC] - Document appium deque integration using the axe devtools for mobile #3013

Merged
merged 16 commits into from
Nov 19, 2024
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
cd2fdbc
Document appium deque integration using the axe devtools for mobile
bahrimootaz Nov 18, 2024
ece3e95
Document appium deque integration using the axe devtools for mobile
bahrimootaz Nov 18, 2024
659edde
Update docs/mobile-apps/automated-testing/appium/appium-2-deque-drive…
bahrimootaz Nov 18, 2024
fc02e34
Update docs/mobile-apps/automated-testing/appium/appium-2-deque-drive…
bahrimootaz Nov 18, 2024
f639f1d
Update docs/mobile-apps/automated-testing/appium/appium-2-deque-drive…
bahrimootaz Nov 18, 2024
ad23197
Update docs/mobile-apps/automated-testing/appium/appium-2-deque-drive…
bahrimootaz Nov 18, 2024
620172e
Update docs/mobile-apps/automated-testing/appium/appium-2-deque-drive…
bahrimootaz Nov 18, 2024
b5079dc
Update docs/mobile-apps/automated-testing/appium/appium-2-deque-drive…
bahrimootaz Nov 18, 2024
e401593
Update docs/mobile-apps/automated-testing/appium/appium-2-deque-drive…
bahrimootaz Nov 18, 2024
76061d9
Document appium deque integration using the axe devtools for mobile
bahrimootaz Nov 19, 2024
7f095cd
Update docs/mobile-apps/automated-testing/appium/appium-versions.md
bahrimootaz Nov 19, 2024
6c7e3e7
Document appium deque integration using the axe devtools for mobile
bahrimootaz Nov 19, 2024
f5bbff0
Document appium deque integration using the axe devtools for mobile
bahrimootaz Nov 19, 2024
8f68844
Merge branch 'refs/heads/main' into mb-deque-docs
bahrimootaz Nov 19, 2024
05309ba
Merge branch 'refs/heads/main' into mb-deque-docs
bahrimootaz Nov 19, 2024
739712a
Merge branch 'main' into mb-deque-docs
bahrimootaz Nov 19, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
183 changes: 183 additions & 0 deletions docs/mobile-apps/automated-testing/appium/appium-2-deque-drivers.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,183 @@
---
id: appium-deque-accessibility-testing

Check warning on line 2 in docs/mobile-apps/automated-testing/appium/appium-2-deque-drivers.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/mobile-apps/automated-testing/appium/appium-2-deque-drivers.md#L2

[sauce.WordList] Use 'Appium' instead of 'appium'.
Raw output
{"message": "[sauce.WordList] Use 'Appium' instead of 'appium'.", "location": {"path": "docs/mobile-apps/automated-testing/appium/appium-2-deque-drivers.md", "range": {"start": {"line": 2, "column": 5}}}, "severity": "WARNING"}
title: Accessibility Testing with Deque axe DevTools® Mobile Drivers
sidebar_label: Appium Deque axe DevTools Accessibility
description: Learn how to run accessibility tests using axe DevTools® Mobile Analyzer drivers hosted in Sauce Labs' private cloud.
---

import useBaseUrl from '@docusaurus/useBaseUrl';
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

<p><span className="sauceGreen">Real Devices</span></p>

[Deque's axe™](https://www.deque.com/axe/) is a leading digital accessibility toolkit.
The [axe DevTools® for Mobile SDK](https://docs.deque.com/devtools-mobile/appium) extends this functionality to mobile platforms,
bahrimootaz marked this conversation as resolved.
Show resolved Hide resolved
enabling automated accessibility testing directly in your Appium workflows for both Android and iOS apps.
This feature supports compliance with accessibility standards such as WCAG and the European Accessibility Act,
ensuring your apps are inclusive for all users.

With this integration, you can:

+ Detect and address accessibility issues early in the development cycle.
+ Automate mobile accessibility testing using Sauce Labs' secure and scalable cloud infrastructure.
+ Gain actionable insights to improve compliance with global accessibility standards.

The following guide explains how to set up Sauce Labs’ integration with [axe DevTools® for Mobile](https://docs.deque.com/devtools-mobile/appium)
and leverage its powerful tools to optimize accessibility testing in your mobile apps.




## What You'll Need

- A Sauce Labs account ([Log in](https://accounts.saucelabs.com/am/XUI/#login/) or sign up for a [free trial license](https://saucelabs.com/sign-up))
- Your Sauce Labs [Username and Access Key](https://app.saucelabs.com/user-settings)
- Familiarity writing and running [Appium tests](/mobile-apps/automated-testing/appium/)
- [A Deque Account](https://axe.deque.com/plans) (axe DevTools® for Mobile Product is required)


## Appium 2 Version: `appium2-deque-accessibility`

Sauce Labs offers various versions of Appium 2 in our cloud. One of these is the `appium2-deque-accessibility` version,
designed to support accessibility testing on mobile apps for both iOS and Android. This version integrates Appium drivers developed by

Check warning on line 43 in docs/mobile-apps/automated-testing/appium/appium-2-deque-drivers.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/mobile-apps/automated-testing/appium/appium-2-deque-drivers.md#L43

[sauce.EOLWhitespace] Remove whitespace characters from the end of the line.
Raw output
{"message": "[sauce.EOLWhitespace] Remove whitespace characters from the end of the line.", "location": {"path": "docs/mobile-apps/automated-testing/appium/appium-2-deque-drivers.md", "range": {"start": {"line": 43, "column": 135}}}, "severity": "WARNING"}
the Deque team, enabling seamless integration of accessibility scans into your existing test automation workflows.

You can find more details on Sauce Labs' [Appium versions documentation](/mobile-apps/automated-testing/appium/appium-versions/#appium-2x).

## Key Features of `appium2-deque-accessibility`

- ****Includes Deque Drivers :**** This version incorporates the following accessibility drivers provided by Deque:
- axe-appium-uiautomator2-driver: Automation name is `AxeUIAutomator2`

Check warning on line 51 in docs/mobile-apps/automated-testing/appium/appium-2-deque-drivers.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/mobile-apps/automated-testing/appium/appium-2-deque-drivers.md#L51

[sauce.WordList] Use 'Appium' instead of 'appium'.
Raw output
{"message": "[sauce.WordList] Use 'Appium' instead of 'appium'.", "location": {"path": "docs/mobile-apps/automated-testing/appium/appium-2-deque-drivers.md", "range": {"start": {"line": 51, "column": 11}}}, "severity": "WARNING"}
- axe-appium-xcuitest-driver: Automation name is `AxeXCUITEST`
:::info Min iOS Version for `axe-appium-xcuitest-driver`:
- You can use the `axe-appium-xcuitest-driver` only for devices with iOS 17 or above.

Check warning on line 54 in docs/mobile-apps/automated-testing/appium/appium-2-deque-drivers.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/mobile-apps/automated-testing/appium/appium-2-deque-drivers.md#L54

[sauce.EOLWhitespace] Remove whitespace characters from the end of the line.
Raw output
{"message": "[sauce.EOLWhitespace] Remove whitespace characters from the end of the line.", "location": {"path": "docs/mobile-apps/automated-testing/appium/appium-2-deque-drivers.md", "range": {"start": {"line": 54, "column": 86}}}, "severity": "WARNING"}
- To ensure compatibility, set the `appium:platformVersion` capability to `'^1(7|8).*$'` in your Appium configuration.
bahrimootaz marked this conversation as resolved.
Show resolved Hide resolved
:::
- ****Backward Compatibility with Deprecated Plugin:**** While Deque’s [axeDevToolsMobile Appium Plugin](https://docs.deque.com/devtools-mobile/2024.2.14/en/june-2024-3)

Check warning on line 57 in docs/mobile-apps/automated-testing/appium/appium-2-deque-drivers.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/mobile-apps/automated-testing/appium/appium-2-deque-drivers.md#L57

[sauce.EOLWhitespace] Remove whitespace characters from the end of the line.
Raw output
{"message": "[sauce.EOLWhitespace] Remove whitespace characters from the end of the line.", "location": {"path": "docs/mobile-apps/automated-testing/appium/appium-2-deque-drivers.md", "range": {"start": {"line": 57, "column": 171}}}, "severity": "WARNING"}
bahrimootaz marked this conversation as resolved.
Show resolved Hide resolved
bahrimootaz marked this conversation as resolved.
Show resolved Hide resolved
has been deprecated, Sauce Labs will continue hosting it until January 31st 2025, allowing users time to migrate to the new drivers.

## How to Use `appium2-deque-accessibility`

Check warning on line 60 in docs/mobile-apps/automated-testing/appium/appium-2-deque-drivers.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/mobile-apps/automated-testing/appium/appium-2-deque-drivers.md#L60

[sauce.Headings] 'How to Use ***************************' should use title case capitalization.
Raw output
{"message": "[sauce.Headings] 'How to Use ***************************' should use title case capitalization.", "location": {"path": "docs/mobile-apps/automated-testing/appium/appium-2-deque-drivers.md", "range": {"start": {"line": 60, "column": 1}}}, "severity": "WARNING"}

Follow these steps to set up and execute accessibility tests using the `appium2-deque-accessibility` image, leveraging Deque's Appium drivers for Android and iOS.

Check warning on line 62 in docs/mobile-apps/automated-testing/appium/appium-2-deque-drivers.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/mobile-apps/automated-testing/appium/appium-2-deque-drivers.md#L62

[sauce.Inclusivity] Avoid problematic language. Use 'run' instead of 'execute'.
Raw output
{"message": "[sauce.Inclusivity] Avoid problematic language. Use 'run' instead of 'execute'.", "location": {"path": "docs/mobile-apps/automated-testing/appium/appium-2-deque-drivers.md", "range": {"start": {"line": 62, "column": 34}}}, "severity": "WARNING"}

1. Set Up Your Appium Capabilities

<Tabs
groupId="appium2-deque-accessibility"
defaultValue="AxeUIAutomator2"
values={[
{label: 'AxeUIAutomator2', value: 'AxeUIAutomator2'},
{label: 'AxeXCUITEST', value: 'AxeXCUITEST'},
]}>
bahrimootaz marked this conversation as resolved.
Show resolved Hide resolved

<TabItem value="AxeUIAutomator2">

<!-- prettier-ignore -->
```js
const capabilities = {
platformName: 'Android',
'appium:platformVersion': '1[0-9]',
'appium:automationName': 'AxeUIAutomator2', // New Automation name goes here

Check warning on line 81 in docs/mobile-apps/automated-testing/appium/appium-2-deque-drivers.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/mobile-apps/automated-testing/appium/appium-2-deque-drivers.md#L81

[sauce.MeaningfulLinkWords] Improve SEO and accessibility by rewriting 'here' in the link text.
Raw output
{"message": "[sauce.MeaningfulLinkWords] Improve SEO and accessibility by rewriting 'here' in the link text.", "location": {"path": "docs/mobile-apps/automated-testing/appium/appium-2-deque-drivers.md", "range": {"start": {"line": 81, "column": 75}}}, "severity": "WARNING"}
'appium:app': 'storage:filename=XXXXXXXXXx',
'appium:appPackage': 'xxxxxxxxxx',
'appium:autoGrantPermissions': true,
'appium:autoAcceptAlerts': true,
'appium:newCommandTimeout': 90,
'sauce:options': {
name: "Android Driver - Testing appium2-deque-accessibility",
appiumVersion: 'appium2-deque-accessibility',
},
}
```
</TabItem>
<TabItem value="AxeXCUITEST">

<!-- prettier-ignore -->
```js
const capabilities = {
platformName: 'iOS',
'appium:platformVersion': '^1(7|8).*$', // The iOS driver will work only on devices running iOS 17 and above
'appium:automationName': 'AxeXCUITEST', // New Automation name goes here

Check warning on line 101 in docs/mobile-apps/automated-testing/appium/appium-2-deque-drivers.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/mobile-apps/automated-testing/appium/appium-2-deque-drivers.md#L101

[sauce.MeaningfulLinkWords] Improve SEO and accessibility by rewriting 'here' in the link text.
Raw output
{"message": "[sauce.MeaningfulLinkWords] Improve SEO and accessibility by rewriting 'here' in the link text.", "location": {"path": "docs/mobile-apps/automated-testing/appium/appium-2-deque-drivers.md", "range": {"start": {"line": 101, "column": 71}}}, "severity": "WARNING"}
'appium:app': 'storage:filename=XXXXXXXXXx',
'appium:appPackage': 'xxxxxxxxxx',
'appium:autoGrantPermissions': true,
'appium:autoAcceptAlerts': true,
'appium:newCommandTimeout': 90,
'sauce:options': {
name: "iOS Driver - Testing appium2-deque-accessibility",
resigningEnabled: true,
appiumVersion: 'appium2-deque-accessibility',
},
}
```
</TabItem>

</Tabs>

2. Obtain Your Deque API Key
Log in to your [axe Deque account setting page](https://axe.deque.com/settings) and retrieve your API key.

Check warning on line 119 in docs/mobile-apps/automated-testing/appium/appium-2-deque-drivers.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/mobile-apps/automated-testing/appium/appium-2-deque-drivers.md#L119

[sauce.EOLWhitespace] Remove whitespace characters from the end of the line.
Raw output
{"message": "[sauce.EOLWhitespace] Remove whitespace characters from the end of the line.", "location": {"path": "docs/mobile-apps/automated-testing/appium/appium-2-deque-drivers.md", "range": {"start": {"line": 119, "column": 107}}}, "severity": "WARNING"}
This key is required to authenticate and initiate accessibility scans during your tests.

3. Prepare Your Testing Script
Once you have your API key, include it in your test script to perform a scan using the `mobile: axeScan` command. Below is an example script:

Check warning on line 123 in docs/mobile-apps/automated-testing/appium/appium-2-deque-drivers.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/mobile-apps/automated-testing/appium/appium-2-deque-drivers.md#L123

[sauce.WordList] Use 'after you' instead of 'Once you'.
Raw output
{"message": "[sauce.WordList] Use 'after you' instead of 'Once you'.", "location": {"path": "docs/mobile-apps/automated-testing/appium/appium-2-deque-drivers.md", "range": {"start": {"line": 123, "column": 1}}}, "severity": "WARNING"}

```js
describe("Test appium2-deque-accessibility - Using Drivers Android/iOS", () => {
it('test appium2-deque-accessibility', async () => {

Check warning on line 127 in docs/mobile-apps/automated-testing/appium/appium-2-deque-drivers.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/mobile-apps/automated-testing/appium/appium-2-deque-drivers.md#L127

[sauce.WordList] Use 'Appium' instead of 'appium'.
Raw output
{"message": "[sauce.WordList] Use 'Appium' instead of 'appium'.", "location": {"path": "docs/mobile-apps/automated-testing/appium/appium-2-deque-drivers.md", "range": {"start": {"line": 127, "column": 14}}}, "severity": "WARNING"}
const apiKey = process.env.DEQUE_API_KEY;
const settings = { apiKey: apiKey }

await driver.execute('mobile: axeScan', settings);
});
});
```
## Migrating from the Deprecated Plugin to Deque New Drivers

Deque's axeDevToolsMobile Appium Plugin is deprecated and will no longer be supported after January 31st 2025. Moving forward,

Check warning on line 137 in docs/mobile-apps/automated-testing/appium/appium-2-deque-drivers.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/mobile-apps/automated-testing/appium/appium-2-deque-drivers.md#L137

[sauce.EOLWhitespace] Remove whitespace characters from the end of the line.
Raw output
{"message": "[sauce.EOLWhitespace] Remove whitespace characters from the end of the line.", "location": {"path": "docs/mobile-apps/automated-testing/appium/appium-2-deque-drivers.md", "range": {"start": {"line": 137, "column": 127}}}, "severity": "WARNING"}
the following drivers should be used to ensure compatibility and continued support for accessibility testing:

- Android: axe-appium-uiautomator2-driver: Automation name is `AxeUIAutomator2`
- iOS : axe-appium-xcuitest-driver: Automation name is `AxeXCUITEST`

Check warning on line 141 in docs/mobile-apps/automated-testing/appium/appium-2-deque-drivers.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/mobile-apps/automated-testing/appium/appium-2-deque-drivers.md#L141

[sauce.WordList] Use 'Appium' instead of 'appium'.
Raw output
{"message": "[sauce.WordList] Use 'Appium' instead of 'appium'.", "location": {"path": "docs/mobile-apps/automated-testing/appium/appium-2-deque-drivers.md", "range": {"start": {"line": 141, "column": 13}}}, "severity": "WARNING"}

### Why Migrate?
- Continued Support: The plugin will no longer receive updates, fixes, or enhancements.
- Expanded Capabilities: The drivers offer better integration and updated functionalities for Android and iOS platforms.
- Compliance with Modern Requirements: For iOS, the new driver supports devices running iOS 17 and above.

### Migration Steps
1. ****Update Your Appium Capabilities****

Replace the old plugin reference with the appropriate new driver. Choose the correct automationName based on your platform:

Use `AxeUIAutomator2` for Android.
Use `AxeXCUITEST` for iOS.

Additionally, specify the appiumVersion as `appium2-deque-accessibility`.

```js
const capabilities = {
...,
'appium:automationName': 'AxeUIAutomator2', // For Android; use 'AxeXCUITEST' for iOS
bahrimootaz marked this conversation as resolved.
Show resolved Hide resolved
...,
'sauce:options': {
...,
appiumVersion: 'appium2-deque-accessibility',
},
};
```
2. ****Update Your Testing Scripts****
The `axe:Scan` command used with the ****deprecated**** plugin should now be replaced with the new `mobile: axeScan` command.

Check warning on line 170 in docs/mobile-apps/automated-testing/appium/appium-2-deque-drivers.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/mobile-apps/automated-testing/appium/appium-2-deque-drivers.md#L170

[sauce.EOLWhitespace] Remove whitespace characters from the end of the line.
Raw output
{"message": "[sauce.EOLWhitespace] Remove whitespace characters from the end of the line.", "location": {"path": "docs/mobile-apps/automated-testing/appium/appium-2-deque-drivers.md", "range": {"start": {"line": 170, "column": 126}}}, "severity": "WARNING"}

This command works with the new drivers and requires the same API key setup.
```js
await driver.execute('mobile: axeScan', scanSettings);
```

## Additional Notes

- Ensure your Appium server is correctly set up to use the `appium2-deque-accessibility` version.

Check warning on line 179 in docs/mobile-apps/automated-testing/appium/appium-2-deque-drivers.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/mobile-apps/automated-testing/appium/appium-2-deque-drivers.md#L179

[sauce.EOLWhitespace] Remove whitespace characters from the end of the line.
Raw output
{"message": "[sauce.EOLWhitespace] Remove whitespace characters from the end of the line.", "location": {"path": "docs/mobile-apps/automated-testing/appium/appium-2-deque-drivers.md", "range": {"start": {"line": 179, "column": 98}}}, "severity": "WARNING"}
- Validate that your app and environment meet the OS version requirements for the selected Deque drivers.

Check warning on line 180 in docs/mobile-apps/automated-testing/appium/appium-2-deque-drivers.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/mobile-apps/automated-testing/appium/appium-2-deque-drivers.md#L180

[sauce.EOLWhitespace] Remove whitespace characters from the end of the line.
Raw output
{"message": "[sauce.EOLWhitespace] Remove whitespace characters from the end of the line.", "location": {"path": "docs/mobile-apps/automated-testing/appium/appium-2-deque-drivers.md", "range": {"start": {"line": 180, "column": 106}}}, "severity": "WARNING"}
- For iOS, remember that the AxeXCUITEST driver only works on devices running iOS 17 or above.
- The axeDevToolsMobile plugin will remain available in the Sauce Labs cloud until January 31st 2025.
- Use the Deque [documentation](https://docs.deque.com/devtools-mobile/appium-setup) for further driver-specific details.
20 changes: 15 additions & 5 deletions docs/mobile-apps/automated-testing/appium/appium-versions.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ The current end-of-life strategy outlined above is specific to Real Devices. We
:::info Supported Custom Appium Plugins:
The following list of custom Appium plugins are supported:
- [Appium Images Plugin](https://www.npmjs.com/package/@appium/images-plugin). This plugin will now be included by default with Appium version `latest` and all subsequent versions released after April 1st.
bahrimootaz marked this conversation as resolved.
Show resolved Hide resolved
- [Deque axe DevTools® Mobile Analyzer Accessibility plugin](https://docs.deque.com/devtools-mobile/appium). This plugin helps you with automated accessibility testing. Empower your team to focus on identifying and resolving accessibility issues. Requires Deque axe DevTools® Mobile license.
- [Deque axe DevTools® Mobile Analyzer Accessibility plugin](https://docs.deque.com/devtools-mobile/appium). This plugin helps you with automated accessibility testing. Empower your team to focus on identifying and resolving accessibility issues. Requires Deque axe DevTools® Mobile license. <b>Deprecated</b>
:::

### Appium 2.x
Expand All @@ -171,7 +171,7 @@ The following list of custom Appium plugins are supported:
</tr>
</thead>
<tbody>
<tr>
<tr>
<td>
<code>stable</code>
</td>
Expand Down Expand Up @@ -260,12 +260,22 @@ The following list of custom Appium plugins are supported:
<ul>
<li>
<a href="https://docs.deque.com/devtools-mobile/2024.2.14/en/june-2024-3" target="_blank">
<code>axeDevToolsMobile Appium Plugin</code>: 2.2.0
<code>axeDevToolsMobile Appium Plugin</code>: 2.2.0 <b>Deprecated</b>
</a>
</li>
<li>
<a href="https://docs.deque.com/devtools-mobile/2024.2.14/en/appium-setup" target="_blank">
<code>axe-appium-xcuitest-driver </code>: 1.0.1
</a>
</li>
<li>
<a href="https://docs.deque.com/devtools-mobile/2024.2.14/en/appium-setup" target="_blank">
<code>axe-appium-uiautomator2-driver </code>: 1.1.0
</a>
</li>
<li>
<a href="https://github.com/appium/appium/releases/tag/appium%402.11.0" target="_blank">
<code>appium</code>: 2.11.0
<a href="https://github.com/appium/appium/releases/tag/appium%402.12.1" target="_blank">
<code>appium</code>: 2.12.1
</a>
</li>
</ul>
Expand Down
1 change: 1 addition & 0 deletions sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -1408,6 +1408,7 @@ module.exports = {
'mobile-apps/automated-testing/appium/test-app-upgrades',
'mobile-apps/automated-testing/appium/appium-flutter',
'mobile-apps/automated-testing/appium/appium-flutter-integration-driver',
'mobile-apps/automated-testing/appium/appium-deque-accessibility-testing',
],
},
{
Expand Down