Run accessibility checks on a Robot sample repo
Try out App Accessibility Automation with BrowserStack’s sample repository.
BrowserStack App Automate supports running Robot Framework tests on a wide range of real Android and iOS devices. You can integrate your existing Robot Framework test suites with App Automate to run accessibility checks on your mobile apps.
This guide helps you run your first Robot test build on a real Android or iOS device on BrowserStack.
Prerequisites
- Ensure you have a BrowserStack Username and Access Key. Obtain your
userName
andaccessKey
from the Account & Profile section on the dashboard.
If you have not yet created an account, sign up for a free trial. - Python3 and Pip3 are installed on your machine.
Run a sample build
Get the sample project
Get the BrowserStack sample project using one of the following options:
Option 1: Download repository
Download the sample Robot repository to your system.
Option 2: Clone repository
Clone the sample Git repository using the following command:
git clone -b sdk https://github.com/browserstack/robot-appium-app-browserstack
Set up the Python virtual environment
Navigate to the sample project directory and create a Python virtual environment.
cd robot-appium-app-browserstack
python3 -m venv env
source env/bin/activate
pip3 install -r requirements.txt
cd robot-appium-app-browserstack
python3 -m venv env
.\env\Scripts\Activate.ps1
pip3 install -r requirements.txt
Update the BrowserStack SDK
If you have not already done so, update the BrowserStack SDK to the latest version.
The minimum supported BrowserStack SDK version is 1.25.0
.
pip install --upgrade browserstack-sdk
Navigate to the platform directory
Based on your testing platform, navigate to the android
or iOS
directory.
cd Tests/android
cd Tests/ios
Modify the configuration file
The browserstack.yml
file defines the required capabilities to run tests on BrowserStack. It is platform-specific and located in the corresponding platform folder (android/
or ios/
). Make sure you modify the file that corresponds to your testing platform.
- Open the
browserstack.yml
file in an editor. - Set your BrowserStack
userName
andaccessKey
. - Set the
accessibility
flag totrue
. The default value isfalse
. - Set the
framework
torobot
. - Save the file.
The projectName
and buildName
config must be static and not change across different runs of the same build. This is a deviation in approach as specified by BrowserStack App Automate since Automated tests will automatically identify different build runs.
userName: YOUR_USERNAME
accessKey: YOUR_ACCESS_KEY
projectName: BrowserStack Samples
buildName: browserstack build
buildIdentifier: '#${BUILD_NUMBER}'
app: ./BStackSampleApp.ipa
framework: robot
platforms:
- deviceName: iPhone 14
osVersion: 16
platformName: ios
- deviceName: iPhone 12
osVersion: 17
platformName: ios
parallelsPerPlatform: 2
accessibility: true
accessibilityOptions:
wcagVersion: wcag21aa
includeIssueType:
bestPractice: false
scannerProcessingTimeout: 10
browserstackLocal: false
debug: false
networkLogs: false
consoleLogs: errors
Run the sample test
In the Python virtual environment, navigate to the platform folder and run the following command to execute the sample test:
You must run the command in the Python virtual environment. For information on setting it up, see Step 2.
browserstack-sdk robot SingleTestAndroid.robot
browserstack-sdk robot SingleTestiOS.robot
View the Accessibility test report
After the test completes, access the report in your project folder on the App Accessibility dashboard.
Next steps
Integrate App Accessibility Automation with your existing Robot Framework test suite.
We're sorry to hear that. Please share your feedback so we can do better
Contact our Support team for immediate help while we work on improving our docs.
We're continuously improving our docs. We'd love to know what you liked
We're sorry to hear that. Please share your feedback so we can do better
Contact our Support team for immediate help while we work on improving our docs.
We're continuously improving our docs. We'd love to know what you liked
Thank you for your valuable feedback!