Skip to content

Latest commit

 

History

History
147 lines (111 loc) · 4.33 KB

plugin-browserstack.adoc

File metadata and controls

147 lines (111 loc) · 4.33 KB

Profiles

The plugin defines profiles with a set of the preconfigured properties.

browserstack/web

Use in conjunction with web application profiles.

browserstack/mobile_app

Use in conjunction with native mobile application profiles.

Required properties:

  • selenium.grid.device-name

Properties

Note
The properties marked with bold are mandatory.
Property Name Acceptable values Default Description

selenium.grid.host

hostname

hub-cloud.browserstack.com

BrowserStack remote end host to be used to create a new session

selenium.grid.username

username

<empty>

BrowserStack username

selenium.grid.password

password

<empty>

BrowserStack access key

browserstack.browserstack-local.enabled

true false

false

Enables BrowserStack Local

  • BrowserStack specific properties must be prepended with prefix

    selenium.grid.capabilities.bstack\:options.

    Meaning, given a property projectName with a value My Project, the resulting property will be

    selenium.grid.capabilities.bstack\:options.projectName=My Project
  • Appium specific properties in BrowserStack must be prepended with prefix

    selenium.grid.capabilities.appium\:options.

    Meaning, given a property clearSystemFiles with a value true, the resulting property will be

    selenium.grid.capabilities.appium\:options.clearSystemFiles=true

Enable network capturing

The following options are available to enable network logs capturing on BrowserStack side:

  • Add selenium.grid.capabilities.bstack:options.networkLogs=true property into tests configuration, this will enable network logs capturing for all stories in suite.

  • Add @capability.bstack:options.networkLogs true meta for a story being run

  • Pass the capability with name bstack:options.networkLogs and value true as parameter to the step starting native mobile application. .Enable network logs in the step starting application

Given I start mobile application with capabilities:
|name                      |value|
|bstack:options.networkLogs|true |

Steps

Save network logs into variable

Saves network traffic captured during application run into variable. The network traffic data is in HAR format. The application session must be closed before network logs can be saved.

When I save BrowserStack network logs to $scopes variable `$variableName`
  1. $scopes - The comma-separated set of the variables scopes.

  2. $variableName - name of variable to save network logs

Save network logs into variable
When I close mobile application
When I save BrowserStack network logs to SCENARIO variable `networkLogs`
Then number of JSON elements from `${networkLogs}` by JSON path `$..*[?(@.url == 'https://graph.example.com/v8.0')]` is equal to 1

Save network logs into context

Saves network traffic captured during application run into JSON context. The network traffic data is in HAR format. The application session must be closed before network logs can be saved.

When I save BrowserStack network logs to JSON context

To interact with the saved network logs see JSON steps that work with the JSON context

Save network logs into variable
When I close mobile application
When I save BrowserStack network logs to JSON context
Then number of JSON elements from `${networkLogs}` by JSON path `$..*[?(@.url == 'https://graph.example.com/v8.0')]` is equal to 1