Configuration Syntax: Playwright

Please refer to the Common Configuration Syntax Referencefor information regarding fields such as apiVersion, kind, and sauce.

Example Configuration#

.sauce/config.yml
loading...
See full example on GitHub

playwright#

Description: Details specific to the playwright project configuration.

Type: object

Example:

playwright:
version: ##VERSION##

version#

Description: Version of playwright to use during tests.

Type: string

Example:

version: ##VERSION##

suites#

Description: Field for defining test suite details such as the suite name, desired browser, and test params.

Type: object

Example:

suites:
- name: "saucy test"
platformName: "Windows 10"
testMatch: '**/*.js'
params:
browserName: "firefox"
headful: false
slowMo: 1000

name#

Description: Name of the test suite.

Type: string

Example:

- name: "saucy test"

platformName#

Sauce Cloud only

Description: Operating system on which the browser and test runs.

Type: string

Example:

platformName: "Windows 10"

testMatch#

Description: The explicit name, regex, or location of the test files

Type: string | regex

Example:

testMatch: '**/*.js'

screenResolution#

Sauce Cloud only

Description: Field where you can change the browser window screen resolution.

Type: string

Example:

screenResolution: "1920x1080"
note

For all available resolutions please see Sauce Labs Custom Testing Options.

env#

Description: Field where you can pass environment variables.

Type: object

Example:

env:
hello: world

params#

Description: This field is for specific test run parameters, for example:

  • browserName ( string ) : the browser in which to run tests
  • headful ( boolean ) : whether to run browsers in headless mode
  • sloMo ( int ) : whether to implement artificially slow load times in milliseconds

Type: object

Example:

params:
browserName: "firefox"
headful: false
slowMo: 1000
Last updated on by Nancy Sweeney