Select browsers and devices

Learn about the capabilities that you can use to run tests on a particular browser / OS.

Following are a list of capabilities which can you can use to specify which browser / os / device combination you want to run your test on. You can create a unique combination from either the BrowserStack specific capabilities or Selenium capabilities.

Note: If you are using Selenium 4 alpha, you’ll have to follow the W3C syntax for passing on these capabilities. Visit the capabilities generator to learn how to pass the capabilities in Selenium 4.

BrowserStack-specific capabilities (Desktop)

Here is the list of custom capabilities offered by BrowserStack to easily specify the required browser and OS on desktop.

Capability Description Expected values
browser Browser you want to test on Chrome, Firefox, IE, Safari, Edge, Opera
browser_version Browser version you want to test By default, we run tests on latest stable version of specified browser. View the list of supported browser versions.

You can also use latest-beta, latest, latest - 1, latest - 2, etc., to test on the current beta release or latest n versions of the specified browser as you specify.
os OS you want to test on Windows, OS X
os_version Version of the OS to test on Windows: XP, 7, 8, 8.1 and 10

OS X: Snow Leopard, Lion, Mountain Lion, Mavericks, Yosemite, El Capitan, Sierra, High Sierra, Mojave, Catalina

BrowserStack-specific capabilities (Mobile)

Here is the list of custom capabilities offered by BrowserStack to easily specify the required device and OS version in mobile. Note that you will need to be on the Automate Mobile plan to be able to run tests on mobile and tablet devices.

Capability Description Expected values
device Mobile or tablet to test on The device you want to test on. View the list of devices we support.
os_version Version of the OS to test on Check the OS versions available for the specified device here

Selenium capabilities

Here is a list of capabilities offered by Selenium to specify the browser and OS. If you are writing your tests from scratch, we recommend you use the BrowserStack-specific capabilities as we will add new features (like specifying versions as latest flags) there, but won’t change the behaviour of the default Selenium capabilities.

Capability Description Expected values
platform OS you want to test MAC, WIN8, XP, WINDOWS, ANY, ANDROID.
Default: ANY
browserName Browser you want to test firefox, chrome, internet explorer, safari, opera, edge, iPad, iPhone, android
Default: chrome
version Browser version you want to test View list of browser versions to update this field.
Default: Latest stable version of browser selected.

Capability override rules

  • If browser and browserName are both defined, browser has precedence (except if browserName is either android, iphone, or ipad, in which case browser is ignored and the default browser on those devices is selected).
  • If browser_version and version are both defined, browser_version has precedence.
  • If os and platform are both defined, os has precedence.
  • os_version can only be defined when os has been defined.
  • platform and os_version cannot be defined together, if os has not been defined.
  • The value ANY if given to any capability that supports that value is same as the capability preference not specified.
  • Default browser is Chrome on desktop when no browser is passed by the user or the selenium API (implicitly).

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