Capabilities Reference
Browserstack-specific capabilities
Capability | Values |
---|---|
userName For running your Selenium and Appium tests on BrowserStack it, requires a username and an access key for authenticating the user. This capability can be used to set the username. |
You can find your username and access key on the Settings page under the Automate section. Example: { "bstack:options": { "userName": "<BROWSERSTACK_USERNAME>" } } |
accessKey For running your Selenium and Appium tests on BrowserStack it, requires a username and an access key for authenticating the user. This capability can be used to set the access key. |
You can find your username and access key on the Settings page under the Automate section. Example: { "bstack:options": { "accessKey": "<BROWSERSTACK_ACCESSKEY>" } } |
os OS you want to test. |
Windows, OS X |
osVersion OS version you want to test. |
Windows: XP, 7, 8, 8.1, 10 and 11 OS X: Snow Leopard, Lion, Mountain Lion, Mavericks, Yosemite, El Capitan, Sierra, High Sierra, Mojave, Catalina, Big Sur, Monterey and Ventura |
Test configuration capabilities:
Capability | Values |
---|---|
projectName Allows the user to specify a name for a logical group of builds. |
Example: loginformproject Default: Untitled Project |
buildName Allows the user to specify a name for a logical group of tests. |
Example: build 4.5 Default: Untitled Build |
sessionName Allows the user to specify an identifier for the test run. |
Example: logintest |
local Use this capability to test your locally hosted websites on BrowserStack by setting the value to true. To enable access to the local machine you need to setup BrowserStack Local binary. |
true, false Default: false Example: { "bstack:options": { "local": true } } |
localIdentifier Use this capability to specify the unique Local Testing connection name in your test. |
String Example: local_connection_name |
debug Required if you want to generate screenshots at various steps in your test. |
true, false Default: false |
consoleLogs Required if you want to capture browser console logs at various steps in your test. Console Logs are available for Selenium tests on Desktop Chrome and Mobile Chrome (Android devices). |
disable, errors, warnings, info, verbose Default: errors disable: stops capturing the console logs errors: shows only error output in console warnings: shows warning and error output in the console info: shows info statement, warning and error output in the console verbose: shows all console output |
networkLogs Required if you want to capture network logs for your test. Network Logs are supported for all desktop browsers, Android and iOS devices with a few exceptions - IE 10 on any OS; IE 11 on Windows 7 / 8.1 and any browser on MacOS High Sierra and Mojave. |
true, false Default: false Note: You may experience minor reductions in performance when testing with Network Logs turned on with Desktop sessions. |
appiumLogs Required if you want to capture raw appium logs for your test. |
true, false Default: true |
video Required if you want to enable video recording during your test. |
true, false Default: true |
seleniumLogs Required if you want to enable selenium logs for your desktop browser tests. |
true, false Default: true |
telemetryLogs Required if you want to capture telemetry logs for your test. Telemetry Logs are supported for all desktop browsers on any OS except for Windows XP and all MacOS versions below Sierra. |
true, false Default: false Example: { "bstack:options": { "telemetryLogs": true } } |
geoLocation Use this capability to simulate website and mobile behavior from different locations. Traffic to your website or mobile app will originate from an IP address hosted in the country you have chosen. Note: This capability is available with enterprise plans only. |
"CN" for China, "FR" for France, "IN" for India and "US" for United States of America and so on. View the list of 65+ supported countries. Example: { "bstack:options": { "geoLocation": "CN" } } |
timezone Use this capability to run your tests on a custom timezone. Note: The functionality is supported across all Windows, macOS, Android and iOS v13 and above devices. |
New_York for America/New_York, London for Europe/London, Kolkata for Asia/Kolkata. Set the city name as value. You can view the complete list of timezones on Wikipedia. Example: { "bstack:options": { "timezone": "New_York" } } This feature is not supported on the following devices: ["Oppo Reno 6", "Xiaomi Redmi Note 9", "Xiaomi Redmi Note 11", "Huawei P30", "Huawei P30", "Huawei P30", "Oppo Reno 3 Pro", "Realme 8"]
|
resolution Set the resolution of VM before beginning of your test. |
Windows (XP): 800x600, 1024x768, 1280x800, 1280x1024, 1366x768, 1440x900, 1680x1050, 1600x1200, 1920x1200, 1920x1080, 2048x1536, 2560x1600, 2560x1920 Windows (7): 800x600, 1024x768, 1280x800, 1280x1024, 1366x768, 1440x900, 1680x1050, 1600x1200, 1920x1200, 1920x1080, 2048x1536, 2560x1600, 2560x1920, 3840x2160 Windows (8,8.1,10,11): 1024x768, 1280x800, 1280x1024, 1366x768, 1440x900, 1680x1050, 1600x1200, 1920x1200, 1920x1080, 2048x1536, 2560x1600, 2560x1920, 3840x2160 OS X (Ventura,Monterey,Big Sur,Catalina,Mojave,High Sierra): 1024x768, 1280x960, 1280x1024, 1600x1200, 1920x1080, 2560x1440, 2560x1600, 3840x2160 OS X (All other versions): 1024x768, 1280x960, 1280x1024, 1600x1200, 1920x1080 Default: 1920x1080 |
seleniumVersion Use this capability to set the Selenium WebDriver version in test scripts. |
"3.7.0", "3.7.1", "3.8.0", "3.8.1", "3.9.0", "3.9.1", "3.10.0", "3.11.0", "3.12.0", "3.13.0", "3.14.0", "3.141.0", "3.141.5", "3.141.59", "4.0.0", "4.1.0", "4.1.2", "4.2.2", "4.3.0", "4.4.0", "4.5.0", "4.6.0", "4.7.2", "4.8.0", "4.9.1" Note: Latest jar might not be compatible with older browsers. |
browserstack.maskCommands Use this capability to mask the data sent or retrieved by certain commands. Note: You can pass multiple commands in a single array, separated by commas. |
Default: Empty Array setValues All the text send via sendKeys command will be redacted. getValues All the text retrieved via get command will be redacted. setCookies All the cookies which are set by the addCookie command will be redacted. getCookies All the cookie values obtained using the getCookies and getCookieNamed command will be redacted. Example: browserstackOptions.put("maskCommands", "setValues, getValues, setCookies, getCookies");Note: Sensitive data in certain logs (like Selenium, Appium, video, etc.) cannot be masked. View our documentation to disable these logs instead. |
idleTimeout BrowerStack triggers BROWSERSTACK_IDLE_TIMEOUT error when a session is left idle for more than 90 seconds. This happens as BrowserStack by default waits for the timeout duration for additional steps or commands to run, if we do not receive any command during that time, the session is stopped, changing the session status to TIMEOUT on the Automate dashboard. This capability can be used to modify the timeout value. |
0 to 300 seconds Default: 90 seconds Example: { "bstack:options": { "idleTimeout": 30 } } |
maskBasicAuth If you use basic authentication in your test cases, the username and password would be visible in text logs. Use this capability to mask those credentials. |
true, false Default: false To mask the credentials set the capability to "true". Example: { "bstack:options": { "maskBasicAuth": true } } |
autoWait Use this capability to specify a custom delay between the execution of Selenium commands. |
Default: 20 seconds Example: { "bstack:options": { "autoWait": 35 } } |
hosts Use this capability to add host entry (/etc/hosts) in remote BrowserStack machine. For example, if you use staging.website.com in test cases but do not have a DNS entry for the domain and the public IP, you can use this capability to add host entry in the machine. Note: Supported only on desktop machines. |
<IP_address Domain_name> Example: { "bstack:options": { "hosts": "1.2.3.4 staging.website.com;5.6.7.8 internal.website.com;8.9.10.11 preprod.website.com" } } |
bfcache IE 11 browser uses cached pages when you navigate using the backward or forward browser buttons. You can use this capability to disable the use of cached pages. |
0 and 1 Default: 0 To disable page caching set value as 1 Example: { "bstack:options": { "bfcache": 1 } } |
wsLocalSupport Chrome browser v71 and above have changed the way PAC files are supported. Use this capability to enable WSS (WebSocket Secure) connections to work with Network Logs on Chrome browser v71 and above. If you are using localhost in your test, change it to bs-local.com Note: This capability is only valid for Chrome browsers v71 and above. |
true, false Default: false Example: { "bstack:options": { "wsLocalSupport": true } } |
disableCorsRestrictions Use this capability to disable cross origin restrictions in Safari. Available for Ventura, Monterey, Big Sur, Catalina and Mojave. |
true, false Default: false Example: { "bstack:options": { "disableCorsRestrictions": true } } |
buildTag Use this capability to add a custom tag to the builds. These tags can be used to filter the builds on the Automate dashboard. View Documentation |
Example: { "buildTag": "My Build Tag" } |
Mobile capabilities:
Capability | Values |
---|---|
deviceName Specifies a particular mobile device for the test environment. |
View the list of supported devices. |
appiumVersion Use this capability to set the Appium version in your test scripts. |
Android: 2.0.0 , 1.22.0 , 1.21.0 , 1.20.2 , 1.19.1 , 1.18.0 , 1.17.0 (default on Android 5 and above), 1.16.0 , 1.15.0 , 1.14.0 , 1.8.0 (default on OS version 4.4) iOS: 2.0.0 , 1.22.0 , 1.21.0 , 1.20.2 , 1.19.1 , 1.18.0 , 1.17.0 (default on iOS 12, 13 and 14), 1.16.0 , 1.14.0 , 1.8.0 , 1.7.0 (default on iOS 10 and 11) Note: All values are strings. |
os OS you want to test. |
ios, android |
deviceOrientation Set the screen orientation of mobile device. |
portrait, landscape Default: portrait |
customNetwork Required if you want to simulate the custom network condition. Note: The supported operating systems are iOS and Android. |
Example ('1000', '1000', '100', '1') download speed (kbps), upload speed (kbps), latency (ms), packet loss (%) |
networkProfile Required if you want to simulate different network conditions. Note: The supported operating systems are iOS and Android. |
Example: 2g-gprs-good, 2g-gprs-lossy, 3g-umts-good etc. View the list of supported network profiles. no-network capability is available on all android devices and in ios v11 and above devices. The airplane-mode capability is only available on android devices.
|
Chrome specific capabilities:
Capability | Values |
---|---|
driver Use this capability to specify the chromedriver version. |
The supported values are "2.43", "2.44", "2.45", "2.46", "73.0.3683.68", "74.0.3729.6", "75.0.3770.8", "75.0.3770.90", "75.0.3770.140", "76.0.3809.68", "77.0.3865.40", "78.0.3904.70", "79.0.3945.16", "80.0.3987.16", "81.0.4044.69", "83.0.4103.39", "84.0.4147.30", "85.0.4183.38", "86.0.4240.22", "87.0.4280.20", "87.0.4280.88", "88.0.4324.27", "89.0.4389.23", "90.0.4430.24", "91.0.4472.101", "92.0.4515.43", "93.0.4577.15", "94.0.4606.41", "95.0.4638.17", "96.0.4664.35", "97.0.4692.36", "98.0.4758.48", "98.0.4758.102", "99.0.4844.35", "100.0.4896.20", "101.0.4951.15", "102.0.5005.27", "103.0.5060.24", "104.0.5112.29", "105.0.5195.19", "106.0.5249.21", "107.0.5304.62", "108.0.5359.71", "109.0.5414.74", "110.0.5481.30", "111.0.5563.64", "112.0.5615.28", "113.0.5672.24", "114.0.5735.16". |
IE/Edge capabilities:
Capability | Values |
---|---|
IE noFlash Use this capability to disable flash on Internet Explorer. |
true, false |
IE compatibility Use this capability to set Internet Explorer Compatibility View. |
The supported values are 11001, 11000, 10001, 10000, 9999, 9000, 8888, 8000 and 7000. Refer to this Internet Explorer documentation for an explanation on these values. |
IE arch Use this capability to specify the IE WebDriver architecture. |
The supported values are "x32" for 32-bit and "x64" for 64-bit. |
IE driver Use this capability to specify the IE WebDriver version. |
The supported values are "3.13.0", "3.14.0", "3.141.0", "3.141.5", "3.141.59", "4.0.0". |
IE enablePopups Use this capability to enable the popups in IE. |
true, false |
Edge enablePopups Use this capability to enable the popups in Edge. |
true, false |
Edge enableSidebar Use this capability to enable the sidebar in Edge. |
true, false |
browserstack.sendKeys Set the capability to ‘True’ while using sendKeys on IE 11 browser. |
true, false Default: false Example: capabilities.setCapability("browserstack.sendKeys", "true"); Note: Refer to the complete documentation. |
Safari capabilities:
Capability | Values |
---|---|
enablePopups Safari browser disables pop-ups by default, that is, any action that triggers a popup window is disabled in Safari. Use this capability to enable popups in Safari. |
true, false Default: false This capability enables the popup by setting the value to true. Example: { "bstack:options": { "safari": { "enablePopups": true } } } |
allowAllCookies Use this capability to enable all cookies in Safari. |
true, false |
driver Use this capability to specify the Safari WebDriver version. |
"2.45", "2.48" |
Firefox and Gecko driver capabilities:
Capability | Values |
---|---|
driver Use this capability to specify the version of geckodriver. |
"0.20.0", "0.20.1", "0.21.0", "0.22.0", "0.23.0", "0.24.0", "0.25.0", "0.26.0", "0.27.0", "0.28.0", "0.29.0", "0.29.1", "0.30.0", "0.31.0", "0.32.0", "0.33.0" |
Selenium capabilities
Capability | Values |
---|---|
browserName Run your tests on a specific browser by setting the browser name as the value. |
Firefox, Safari, IE, Chrome, Opera, Edge Example: { "browserName": "Chrome" } |
browserVersion Run your tests on a specific browser version by setting the browser version as the value. |
latest-beta, latest, latest-1, latest-2 or so on.. Use latest-beta or latest [-n number] format to automatically choose the current beta release of the browser or the latest (and other older) browser versions available on BrowserStack without having to change code. A common use case is to run tests on the latest browser versions and the beta versions for frequently updated browsers such as Chrome and Firefox. Example: {"browserVersion", "latest"} Specific browser version Pass a particular browser version number. Example: {"browserVersion", "11.0"} // for IE-11 browser Default: Latest stable version of browser is used. Note: latest-beta, latest, latest-1, and other latest flags are dependent on the selected OS and OS Version. For example, on Windows 10, IE browser, the latest version would be 11.0, and on OS X Mojave, Safari browser, the latest version would be 12.0 View the list of latest browser versions. |
acceptSslCerts Use this capability to ignore invalid certificate error in your test. |
true, false Default: false |
Deprecated capabilities
The following capabilities are deprecated and will not work in the near future. Please use the alternate capability instead of deprecated capability.
Deprecated capability | Alternate capability |
---|---|
geckodriver This capability specifies the geckodriver version to be used with the Firefox browser. |
firefox.driver |
ie.alternateProxy This capability is used to set a proxy on the Internet Explorer browser. |
local |
tunnel This capability is used to test your locally hosted websites on BrowserStack. To enable access to the local machine you need to setup BrowserStack Local binary. |
local |
maskSendKeys The input provided in the test would be visible in text logs. This capability is used to mask these input keys. |
maskCommands |
selenium.jar.version This capability is used to set the Selenium WebDriver version in test scripts. |
seleniumVersion |
Parameter override rules
- osVersion can only be defined when os has been defined.
- Default browser is chrome when no browser is passed by the user or the selenium API (implicitly).
- If consoleLogs is enabled it will take precedence over Logging Preferences of type BROWSER that you may have set in your test script