Skip to main content
Introducing the Automate SDK! Get your entire test suite running on BrowserStack in minutes! Learn More.
No Result Found

Selenium with WebdriverIO

Your guide to running tests using WebdriverIO on BrowserStack’s Selenium Grid of 3000+ real devices and desktop browsers.

Run tests on 3000+ real devices and desktop browsers

This section covers running your first build with BrowserStack’s sample repo. To run builds with your existing test suite(s), skip to integrate your test suite.

Prerequisites

Run sample build

Run a sample WebdriverIO test build using the following steps on BrowserStack:

Clone the sample repository

Clone the sample repository and install the dependencies using the following commands:

Copy icon Copy

Configure the test script

To run a test, you need to configure the following parameters in the sample repository.

Set access credentials

Set the user and key variables to your BrowserStack credentials in the base.conf.js file. This is required to authenticate your tests with BrowserStack.

Configure browser or device combinations

Choose from 3000+ real mobile devices and browsers available on BrowserStack:

Parallel thread #1
Parallel thread #2
Parallel thread #3
Did you know?

You can optimize your web apps for your mobile users by testing them on mobile devices. To get started, select a mobile device above.

Why test on mobile browsers?

Copy and replace the test.conf.js config file

Copy the following configuration and add it to the webdriverio-browserstack/conf/test.conf.js file of the sample repository.

Copy icon Copy

Execute the build on BrowserStack

You are now ready to run your build on BrowserStack. From the root directory of this project, run the following command.

Copy icon Copy

Facing issues? View commonly occurring errors

Check the regular culprits

Check if the file is saved correctly and you’ve installed the required packages and libraries installed to run the test. In most cases, searching on Google is helpful.

Authentication errors

If you’re encountering authentication errors, it’s possible that you haven’t passed the correct credentials, or that the credentials you passed are incorrect. You can find your Username and Access Key in the Account profile page. Try running the test again and it should solve your issue!

Behind a proxy?

You might face some connection issues if you are behind a proxy as your network may be blocking traffic to browserstack.com. Allowlist the traffic to *.browserstack.com and you’re all set. If you have a complex network setup, reach out to our Support team and they’ll work with you to get this working.

After you run your test, visit the Automate dashboard to view your test results.

Next steps

After you have successfully run your first test on BrowserStack, try integrating your test suite with BrowserStack

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