You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/accessibility-android-automation-test.md
+156Lines changed: 156 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -42,3 +42,159 @@ import TabItem from '@theme/TabItem';
42
42
})
43
43
}}
44
44
></script>
45
+
LambdaTest now enables native Accessibility Automation Testing for Android apps using HyperExecute and Appium. This feature helps developers and QA teams to validate the accessibility of their mobile apps programmatically by leveraging LambdaTest's device cloud.
46
+
47
+
With built-in support for `lambda-accessibility-scan`, this integration ensures that your apps are tested for compliance with accessibility standards and best practices like WCAG (Web Content Accessibility Guidelines).
48
+
49
+
## Prerequisites
50
+
Before getting started, ensure the following:
51
+
52
+
- You have a LambdaTest account.
53
+
- LambdaTest credentials (username & access key).
54
+
- Android app uploaded to LambdaTest App Storage (lt://APP_ID).
55
+
- Python 3 installed locally.
56
+
- Appium-Python-Client installed
57
+
- Access to a valid Android device on LambdaTest (real or virtual).
58
+
59
+
## Step 1: Setup the Environment Variables
60
+
61
+
You need to export your environment variables *LT_USERNAME* and *LT_ACCESS_KEY* that are available in your [LambdaTest Profile page](https://accounts.lambdatest.com/security). Run the below mentioned commands in your terminal to setup the environment variables.
set LT_ACCESS_KEY="${ YOUR_LAMBDATEST_ACCESS_KEY()}"`}
77
+
</CodeBlock>
78
+
</div>
79
+
</TabItem>
80
+
</Tabs>
81
+
82
+
## Step 2: Upload your Application
83
+
Upload your **_iOS_** application (.ipa file) or **_android_** application (.apk or .aab file) to the LambdaTest servers using our **REST API**. You need to provide your **Username** and **AccessKey** in the format `Username:AccessKey` in the **cURL** command for authentication.
84
+
85
+
Make sure to add the path of the **appFile** in the cURL request. Below is an example cURL request to upload your app using our REST API:
- If you do not have any **.apk** or **.ipa** file, you can run your sample tests on LambdaTest by using our sample apps, :link:[Android app](https://prod-mobile-artefacts.lambdatest.com/assets/docs/proverbial_android.apk) or :link:[iOS app](https://prod-mobile-artefacts.lambdatest.com/assets/docs/proverbial_ios.ipa).
110
+
111
+
- Response of above cURL will be a **JSON** object containing the `APP_URL` of the format - `lt://APP123456789123456789` and will be used in the next step
112
+
113
+
:::
114
+
115
+
## Step 3: Configure required Capabilities
116
+
To enable accessibility testing, the following two configurations are mandatory:
You may call `lambda-accessibility-scan` multiple times to scan different app screens or flows.
129
+
130
+
131
+
:::info
132
+
133
+
- You must add the generated **APP_URL** to the `app` capability in the config file.
134
+
- You can generate capabilities for your test requirements with the help of our inbuilt [**Capabilities Generator tool**](https://www.lambdatest.com/capabilities-generator/).For more details, please refer to our guide on [**Desired Capabilities in Appium**](https://www.lambdatest.com/support/docs/desired-capabilities-in-appium/).
135
+
136
+
:::
137
+
138
+
### Sample Script
139
+
140
+
```python
141
+
from curses import flash
142
+
import time
143
+
# import requests
144
+
from appium import webdriver
145
+
from selenium.webdriver.support.ui import WebDriverWait
146
+
from selenium.webdriver.support import expected_conditions asEC
147
+
import unittest
148
+
import os
149
+
from appium import webdriver
150
+
from appium.options.android import UiAutomator2Options
151
+
import sys
152
+
from selenium.webdriver.common.by import By
153
+
from appium.webdriver.client_config import AppiumClientConfig
0 commit comments