Skip to main content
No Result Found
Connect & Get help from fellow developers on our Discord community. Ask the CommunityAsk the Community

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

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

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.

  1. Open the browserstack.yml file in an editor.
  2. Set your BrowserStack userName and accessKey.
  3. Set the accessibility flag to true. The default value is false.
  4. Set the framework to robot.
  5. 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.


Visit 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





Thank you for your valuable feedback

Is this page helping you?

Yes
No

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!

Talk to an Expert
Download Copy Check Circle