Skip to main content

A fresh look for capability generator

We are excited to unveil a fresh look for capabilities, along with SDK configuration and improved navigation. Hope you love it as much as we do.

Capabilities

Capabilities are a series of key-value pairs that allow you to configure your tests on the BrowserStack cloud grid.

Capability generator

Other frameworks


Prefer old UI? Return to old experience

Capabilities reference gist file

Expand this section to check out the list of supported Capabilities
# =============================================================================================================================
# Set BrowserStack Credentials
# =============================================================================================================================
userName: YOUR_USERNAME
accessKey: YOUR_ACCESS_KEY

# Set `framework` of your test suite. Example, `testng`, `cucumber`, `cucumber-testng`
framework: testng # Required only for java based frameworks

# =============================================================================================================================
# Parallels per Platform
# =============================================================================================================================
# The number of parallel threads to be used for each platform set.
# BrowserStack's SDK runner will select the best strategy based on the configured value
#
# Example 1 - If you have configured 3 platforms and set `parallelsPerPlatform` as 2, a total of 6 (2 * 3) parallel threads
# will be used on BrowserStack
#
# Example 2 - If you have configured 1 platform and set `parallelsPerPlatform` as 5, a total of 5 (1 * 5) parallel threads 
# will be used on BrowserStack
parallelsPerPlatform: 1

# =============================================================================================================================
# Platforms (Browsers / Devices to test)
# =============================================================================================================================
# Platforms object contains all the browser / device combinations you want to test on.

platforms:
  - os: OS X
    osVersion: Big Sur
    browserName: Chrome
    browserVersion: latest
    # ===============================================
    # Chrome Browser Specific Capabilities (OPTIONAL)
    # ===============================================
    chrome:
      driver: 112.0.5615.28
    chromeOptions: 
      args:                      
        - --start-maximized
    # ===============================================  
  - os: Windows
    osVersion: 11
    browserName: Edge
    browserVersion: latest
    # ===============================================
    # Edge Browser Specific Capabilities (OPTIONAL)
    # ===============================================
    edge: 
      enablePopups: false #<boolean> (Default: X) Set to true if you want to enable Popups
      enableSidebar: false #<boolean> (Default: X) Set to true if you want to enable sidebar
    # ===============================================        
  - os: Windows
    osVersion: 10
    browserName: Firefox
    browserVersion: latest
    # ===============================================
    # Firefox Browser Specific Capabilities (OPTIONAL)
    # ===============================================
    firefox: 
      driver: 0.32.0 #Set the driver version you want to use
    # ===============================================        
  - os: OS X
    osVersion: Big Sur
    browserName: Safari
    browserVersion: 14.1
    # ===============================================
    # Safari Browser Specific Capabilities (OPTIONAL)
    # ===============================================
    safari:
      driver: 2.45 #Set the driver version you want to use
      enablePopups: false #<boolean> (Default: X) Set to true if you want to enable Popups
      allowAllCookies: false #<boolean> (Default: false) Set to true if you want to allow all cookies
    # ===============================================        

# =============================================================================================================================
# BrowserStack Reporting 
# =============================================================================================================================
#Set 'projectName' to the name of your project.
projectName: BrowserStack Samples 

#Set 'projectName' to the name of your project.
buildName: browserstack build 

# buildIdentifier` is a unique id to differentiate every execution that gets appended to buildName. 
# Choose your buildIdentifier format from the available expressions:
# ${BUILD_NUMBER} (Default): Generates an incremental counter with every execution
# ${DATE_TIME}: Generates a Timestamp with every execution. Eg. 05-Nov-19:30
buildIdentifier: '${BUILD_NUMBER}'

# =============================================================================================================================
# BrowserStack Local (For localhost, staging/private websites)
# =============================================================================================================================

# Set browserStackLocal to true if your website under test is not accessible publicly over the internet
browserstackLocal: true # <boolean> (Default true)
# Options to be passed to BrowserStack local in-case of advanced configurations
browserStackLocalOptions:
  forceLocal: true  # <boolean> (Default: false) Set to true to resolve all your traffic via BrowserStack Local tunnel.
  localIdentifier: randomstring # <string> (Default: null) Needed if you need to run multiple instances of local.
  proxyHost: 127.0.0.1 
  proxyPort: 8000
  proxyUser: user
  proxyPass: password
  -pac-file: <pac_file_abs_path> #<string> Pass the absolute path of PAC file for proxy server related decisioning
  f: /my/awesome/folder # <string> Pass the path of test HTML files on BrowserStack local.
  verbose: 3
  -use-ca-certificate: <path_to_pem_file>
  -use-system-installed-ca: true
  -log-file: <path_to_log_file>

# =============================================================================================================================
# Debugging features
# =============================================================================================================================
debug: false # <boolean> # Set to true if you need screenshots for every selenium command ran
networkLogs: false # <boolean> Set to true to enable HAR logs capturing
consoleLogs: errors # <string> Remote browser's console debug levels to be printed (Default: errors)
# Available options are `disable`, `errors`, `warnings`, `info`, `verbose` (Default: errors)  

# =============================================================================================================================
# TEST CONFIGURATION CAPABILITIES
# =============================================================================================================================
video: true
seleniumLogs: true
telemetryLogs: true
geoLocation: CN
timezone: New_York 
resolution: 1024x768
idleTimeout: 30
maskCommands: setValues, getValues, setCookies, getCookies
maskBasicAuth: true
autoWait: 35
hosts: 1.2.3.4 staging.website.com
bfcache: 1
wsLocalSupport: true
disableCorsRestrictions: true
httpProxy: http://user:pwd@127.0.0.1:1234  #Add the proxy parameters in the adjacent format to use httpProxy
httpsProxy: https://user:pwd@127.0.0.1:1234  #Add the proxt parameters in the adjacent format to use httpsProxy
# =============================================================================================================================
# MOBILE SPECIFIC CAPABILITIES
# =============================================================================================================================

# Set the screen orientation of mobile device.
deviceOrientation: portrait # select between portrait/landscape
# Required if you want to simulate the custom network condition.
customNetwork: 1000 #download speed (kbps), upload speed (kbps), latency (ms), packet loss (%)
# Required if you want to simulate different network conditions.
networkProfile: 2g-gprs-good #(select between multiple options)

# =============================================================================================================================
# BROWSER SPECIFIC CAPABILITIES
# =============================================================================================================================

# Browser specific capabilities have to be strictly placed with respective platform capabilites inside the platforms object 

# ===============================================
# Chrome Browser Specific Capabilities
# ===============================================
# platforms:
#   - os: OS X
#     osVersion: Big Sur
#     browserName: Chrome
#     browserVersion: latest
#     #Chrome specific capabilities
#     chrome: 
#       driver: 112.0.5615.28
#     chromeOptions: 
#       args:                      
#         - incognito
#         - --start-maximized
#       perfLoggingPrefs:
#       enableNetwork: false

# ===============================================
# Edge Browser Specific Capabilities 
# ===============================================
# platforms:
#   - os: Windows
#     osVersion: 11
#     browserName: Edge
#     browserVersion: 111.0
#     # Edge specific capabilities
#     edge: 
#       enablePopups: false #<boolean> (Default: X) Set to true if you want to enable Popups
#       enableSidebar: false #<boolean> (Default: X) Set to true if you want to enable sidebar

# ===============================================
# Safari Browser Specific Capabilities 
# ===============================================
# platforms:
#   - os: OS X
#     osVersion: Big Sur
#     browserName: Safari
#     browserVersion: 14.1
#     # Safari Specific Capabilities (OPTIONAL)
#     safari:
#       driver: 2.45 #Set the driver version you want to use
#       enablePopups: false #<boolean> (Default: X) Set to true if you want to enable Popups
#       allowAllCookies: false #<boolean> (Default: false) Set to true if you want to allow all cookies

# ===============================================
# Firefox Browser Specific Capabilities 
# ===============================================

# platforms:
#   - os: Windows
#     osVersion: 10
#     browserName: Firefox
#     browserVersion: latest
#   # Firefox specific capabilities (Optional)
#     firefox: 
#       driver: 0.32.0 #Set the driver version you want to use

# ===============================================
# IE Browser Specific Capabilities 
# ===============================================      
# platforms:
#   - os: Windows
#     osVersion: 10
#     browserName: IE
#     browserVersion: 11.0
#     # IE specific capabilities (OPTIONAL)
#     ie: 
#       driver: 4.0.0 
#       noFlash: false #<boolean> (Default: X) Set to true if you want to enable flash
#       compatibility: <value>
#       arch: <value>
#       enablePopups: false #<boolean> (Default: X) Set to true if you want to enable Popups
#       enableSidebar: false #<boolean> (Default: X) Set to true if you want to enable sidebar
#       sendKeys: true #<boolean> (Default: X) Allows to type content automatically into editable field while executing tests.


# =============================================================================================================================
# TEST OBSERVABILITY
# =============================================================================================================================

# Test Observability is an intelligent test reporting & debugging product. It collects data using the SDK.
# Visit observability.browserstack.com to see your test reports and insights. To disable test observability, 
# specify `testObservability: false` in the key below.
# Read about what data is collected at https://www.browserstack.com/docs/test-observability/references/terms-and-conditions
testObservability: true 

Capabilities Reference