Skip to main content
No Result Found

Automated tests on WebdriverIO

Quick start guide to integrate Automated tests in BrowserStack Accessibility Testing with WebdriverIO.

Prerequisites

Integrate with Automated tests

Follow these steps to start using BrowserStack Automated tests with your existing setup of WebdriverIO tests running on BrowserStack Automate:

Update to the latest version of the browserstack-service npm package

Go to your WebdriverIO project’s root directory and run the following commands to update the installed version of @wdio/browserstack-service and later check the installed version:

You need to install @wdio/browserstack-service if you’re not already using it and configure it using the following steps:

Terminal
Copy icon Copy

Please ensure that you have v7.33.0 or above (if using WDIO v7) or v8.16.7 or above (if using WDIO v8) before proceeding.

Set up the config file

Your wdio.conf.js file should include the Username and Access Key as in the following code snippet. Also, ensure to set the accessibility flag as true in the config file and define the accessibilityOptions.

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 Automate since Automated tests will automatically identify different build runs.

wdio.conf.js
Copy icon Copy

Any other config parameters that are already existing can exist as it is.

  • Accessibility testing runs only on Desktops (Mac & Windows) with Chrome 100 & above on Automate.

  • Window handle commands might cause instability to Automated Tests. If you face issues, consider removing window handle commands or contact support.

Run your suite with Automated tests

Continue running your tests as you have been running previously. The command to run your tests using the BrowserStack SDK remains unchanged. You can check the Accessibility report for your build through the Automated tests page.


Visit Automated tests page

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