Features

Playwright Options

This page lists various options that you can use to customise your Playwright sessions on TestingBot.

Basic Settings

Browser Name

The name of the browser to run your Playwright test on. Currently only supports Chromium browsers: chrome and edge.


await pw.chromium.connectOverCDP({
    wsEndpoint: 'wss://cloud.testingbot.com?key=api_key&secret=api_secret&browserName=chrome&browserVersion=latest',
  })
await pw.chromium.connectOverCDP({
    wsEndpoint: 'wss://cloud.testingbot.com?key=api_key&secret=api_secret&browserName=edge&browserVersion=latest',
  })

Browser Version

The version of the browser to run your Playwright test on.


Select a browser & version

Other Options:
  • "version": "*" : If you use * as version, TestingBot will pick a random version.
  • "version": "latest" : TestingBot will automatically take the latest version. You can also use latest-1, latest-2, ... to test on the next most recent versions. For example, if the current latest Chrome version is 89 and you use latest-2, then the test will run on Chrome 87.

Make a video of your tests

By default we record a video of your test, which is accessible in the member area. If you do not wish to have this, you can disable it with this option.
Video should not slow down your test considerably.


await pw.chromium.connectOverCDP({
    wsEndpoint: 'wss://cloud.testingbot.com?key=api_key&secret=api_secret&browserName=edge&browserVersion=latest&screenRecorder=false'
  })

Value Type Default Value
boolean true

Test Privacy

Make the test results for this test public so that everyone can access the results.


await pw.chromium.connectOverCDP({
    wsEndpoint: 'wss://cloud.testingbot.com?key=api_key&secret=api_secret&browserName=edge&browserVersion=latest&public=true'
  })

Value Type Default Value
boolean false

Blacklist hostnames

The hostnames you specify will be pointed to localhost instead of their real destination. This means you can speed up tests by blocking third party content which you don't need and slows down your test.


await pw.chromium.connectOverCDP({
    wsEndpoint: 'wss://cloud.testingbot.com?key=api_key&secret=api_secret&browserName=edge&browserVersion=latest&blacklist=site1.com,site2.com'
  })

Value Type
string (comma-separated)

Customize Logging

By default, TestingBot records logs of all Playwright actions.

Set this option to false if you don't want TestingBot to record anything (for example, if you have sensitive data).


await pw.chromium.connectOverCDP({
    wsEndpoint: 'wss://cloud.testingbot.com?key=api_key&secret=api_secret&browserName=edge&browserVersion=latest&recordLogs=true'
  })

Value Type Default Value Possible Values:
boolean true true, false

Custom Time Zones

Change the Time Zone of the Virtual Machine to the Time Zone you specify. You can find a list of timezones on Wikipedia. Only location names are supported (not their paths). See some examples below:


await pw.chromium.connectOverCDP({
    wsEndpoint: 'wss://cloud.testingbot.com?key=api_key&secret=api_secret&browserName=edge&browserVersion=latest&timeZone=Etc/UTC'
  })

Value Type Default Value Possible Values:
string "Etc/UTC" List of timezones

Change Screen Resolution

Will adjust the screen resolution before your test.


await pw.chromium.connectOverCDP({
    wsEndpoint: 'wss://cloud.testingbot.com?key=api_key&secret=api_secret&browserName=edge&browserVersion=latest&screen-resolution=1280x1024'
  })

Value Type Default Value
string "1280x1024"
Platform Resolutions
Windows/Linux
  • 800x600
  • 1024x768
  • 1152x864
  • 1280x768
  • 1280x800
  • 1280x960
  • 1280x1024
  • 1400x1050
  • 1600x1200
  • 1680x1050
  • 1920x1080
  • 1920x1200
  • 2560x1440
macOS
  • 800x600
  • 1024x768
  • 1280x768
  • 1280x800
  • 1280x960
  • 1280x1024
  • 1366x768
  • 1440x900
  • 1600x900
  • 1600x1200
  • 1680x1050
  • 1920x1080
  • 1920x1200
  • 2048x1536

Geolocation Testing

We provide an option where you can specify from which country you'd like to run the test from.

Once you specify this option, the virtual machine we provision for your test will be configured to use a proxy in the country you specified.


await pw.chromium.connectOverCDP({
    wsEndpoint: 'wss://cloud.testingbot.com?key=api_key&secret=api_secret&browserName=edge&browserVersion=latest&geoCountryCode=US'
  })

We currently support the following country codes:


  • 'BE': Belgium
  • 'CN': China
  • 'FR': France
  • 'DE': Germany
  • 'IT': Italy
  • 'JP': Japan
  • 'ES': Spain
  • 'US': United States

Change Test Name

Add a name to this test, which will show up in our member area and API.


await pw.chromium.connectOverCDP({
    wsEndpoint: 'wss://cloud.testingbot.com?key=api_key&secret=api_secret&browserName=edge&browserVersion=latest&name=First-Test'
  })

Value Type Default Value
string unnamed test

Group Tests

A key you can use to group certain tests in the same build (for example in Jenkins).
The builds will appear in our member area.

await pw.chromium.connectOverCDP({
    wsEndpoint: 'wss://cloud.testingbot.com?key=api_key&secret=api_secret&browserName=edge&browserVersion=latest&build=First-Build'
  })

Value Type
string

Custom Metadata

Send along custom data, for example your release, server, commit hash, ...
This will show up on the test detail page in the TestingBot member area.

await pw.chromium.connectOverCDP({
    wsEndpoint: 'wss://cloud.testingbot.com?key=api_key&secret=api_secret&browserName=edge&browserVersion=latest&extra=Extra-Information'
  })

Value Type
string