Automated Test Options
Below are various options you can use for your Automated Testing.
The Selenium-Specific Settings are required to run Automated Tests and are called Desired Capabilities.
The TestingBot Options allow you to customize your test in terms of specific driver versions, privacy options, platform options, ...
Required Selenium Settings
Browser Name
The name of the browser to run your automated test on. Please see our list of browsers that we support.
The browserName
is a required field that needs to be passed to us via Selenium's Desired Capabilities.
ChromeOptions chromeOpts = new ChromeOptions();
chromeOpts.setExperimentalOption("w3c", true);
MutableCapabilities tbOptions = new MutableCapabilities();
tbOptions.setCapability("key", "api_key");
tbOptions.setCapability("secret", "api_secret");
DesiredCapabilities caps = new DesiredCapabilities();
caps.setCapability(ChromeOptions.CAPABILITY, chromeOpts);
caps.setCapability("tb:options", tbOptions);
caps.setCapability("browserName", "chrome");
driver = await new webdriver.Builder().withCapabilities({
"browserName": 'chrome',
/** Google requires "w3c" to be set in "goog:chromeOptions" as true if you're using ChromeDriver version 74 or lower.
* Based on this commit: https://chromium.googlesource.com/chromium/src/+/2b49880e2481658e0702fd6fe494859bca52b39c
* ChromeDriver now uses w3c by default from version 75+ so setting this option will no longer be a requirement **/
"goog:chromeOptions" : { "w3c" : true },
"tb:options": {
"key": "api_key",
"secret": "api_secret"
}
}).usingServer("https://hub.testingbot.com/wd/hub").build();
var chromeOptions = new ChromeOptions()
{
BrowserVersion = "latest",
PlatformName = "Windows 10",
UseSpecCompliantProtocol = true
};
var tbOptions = new Dictionary<string, object>
{
["key"] = "api_key",
["secret"] = "api_secret",
["name"] = TestContext.CurrentContext.Test.Name
};
chromeOptions.AddAdditionalCapability("tb:options", tbOptions, true);
driver = new RemoteWebDriver(new Uri("https://hub.testingbot.com/wd/hub"),
chromeOptions.ToCapabilities(), TimeSpan.FromSeconds(600));
Browser Version
The version of the browser to run your automated test on. Please see our list of browsers + versions that we support.
The version
is a required field that needs to be passed to us via Selenium's Desired Capabilities.
ChromeOptions chromeOpts = new ChromeOptions();
chromeOpts.setExperimentalOption("w3c", true);
MutableCapabilities tbOptions = new MutableCapabilities();
tbOptions.setCapability("key", "api_key");
tbOptions.setCapability("secret", "api_secret");
DesiredCapabilities caps = new DesiredCapabilities();
caps.setCapability(ChromeOptions.CAPABILITY, chromeOpts);
caps.setCapability("browserVersion", "81");
caps.setCapability("tb:options", tbOptions);
caps.setCapability("browserName", "chrome");
driver = await new webdriver.Builder().withCapabilities({
"browserName": 'chrome',
"browserVersion": "81",
/** Google requires "w3c" to be set in "goog:chromeOptions" as true if you're using ChromeDriver version 74 or lower.
* Based on this commit: https://chromium.googlesource.com/chromium/src/+/2b49880e2481658e0702fd6fe494859bca52b39c
* ChromeDriver now uses w3c by default from version 75+ so setting this option will no longer be a requirement **/
"goog:chromeOptions" : { "w3c" : true },
"tb:options": {
"key": "api_key",
"secret": "api_secret"
}
}).usingServer("https://hub.testingbot.com/wd/hub").build();
var chromeOptions = new ChromeOptions()
{
BrowserVersion = "81",
PlatformName = "Windows 10",
UseSpecCompliantProtocol = true
};
var tbOptions = new Dictionary<string, object>
{
["key"] = "api_key",
["secret"] = "api_secret",
["name"] = TestContext.CurrentContext.Test.Name
};
chromeOptions.AddAdditionalCapability("tb:options", tbOptions, true);
driver = new RemoteWebDriver(new Uri("https://hub.testingbot.com/wd/hub"),
chromeOptions.ToCapabilities(), TimeSpan.FromSeconds(600));
-
"version": "*"
: If you use*
as version, TestingBot will pick a random version. -
"version": "latest"
: TestingBot will automatically take the latest version. You can also uselatest-1
,latest-2
, ... to test on the next most recent versions. For example, if the current latest Firefox version is 81 and you uselatest-2
, then the test will run on Firefox 79. -
"version": "<=16"
: TestingBot will pick a version smaller than or equal to the version you specify with<=
.
"version": "16>="
: TestingBot will pick a version higher than or equal to the version you specify with>=
.
Platform
Indicates on which operating system the test should run. Please see a list of platforms that we currently support.
The platform
is a required field that needs to be passed to us via Selenium's Desired Capabilities.
ChromeOptions chromeOpts = new ChromeOptions();
chromeOpts.setExperimentalOption("w3c", true);
MutableCapabilities tbOptions = new MutableCapabilities();
tbOptions.setCapability("key", "api_key");
tbOptions.setCapability("secret", "api_secret");
DesiredCapabilities caps = new DesiredCapabilities();
caps.setCapability(ChromeOptions.CAPABILITY, chromeOpts);
caps.setCapability("platformName", "Windows 10");
caps.setCapability("tb:options", tbOptions);
caps.setCapability("browserName", "chrome");
driver = await new webdriver.Builder().withCapabilities({
"browserName": 'chrome',
"platformName": 'Windows 10',
/** Google requires "w3c" to be set in "goog:chromeOptions" as true if you're using ChromeDriver version 74 or lower.
* Based on this commit: https://chromium.googlesource.com/chromium/src/+/2b49880e2481658e0702fd6fe494859bca52b39c
* ChromeDriver now uses w3c by default from version 75+ so setting this option will no longer be a requirement **/
"goog:chromeOptions" : { "w3c" : true },
"tb:options": {
"key": "api_key",
"secret": "api_secret"
}
}).usingServer("https://hub.testingbot.com/wd/hub").build();
var chromeOptions = new ChromeOptions()
{
BrowserVersion = "81",
PlatformName = "Windows 10",
UseSpecCompliantProtocol = true
};
var tbOptions = new Dictionary<string, object>
{
["key"] = "api_key",
["secret"] = "api_secret",
["name"] = TestContext.CurrentContext.Test.Name
};
chromeOptions.AddAdditionalCapability("tb:options", tbOptions, true);
driver = new RemoteWebDriver(new Uri("https://hub.testingbot.com/wd/hub"),
chromeOptions.ToCapabilities(), TimeSpan.FromSeconds(600));
Device Name
When running a mobile automated test, you'll need to specify on which mobile device (or simulator/emulator) you want to test.
ChromeOptions chromeOpts = new ChromeOptions();
chromeOpts.setExperimentalOption("w3c", true);
MutableCapabilities tbOptions = new MutableCapabilities();
tbOptions.setCapability("key", "api_key");
tbOptions.setCapability("secret", "api_secret");
DesiredCapabilities caps = new DesiredCapabilities();
caps.setCapability(ChromeOptions.CAPABILITY, chromeOpts);
caps.setCapability("platformName", "Android");
caps.setCapability("tb:options", tbOptions);
caps.setCapability("appium:deviceName", "Samsung S23");
driver = await new webdriver.Builder().withCapabilities({
"browserName": 'chrome',
"appium:deviceName": 'Samsung S23',
"platformName": 'Android',
"goog:chromeOptions" : { "w3c" : true },
"tb:options": {
"key": "api_key",
"secret": "api_secret"
}
}).usingServer("https://hub.testingbot.com/wd/hub").build();
var chromeOptions = new ChromeOptions()
{
PlatformName = "Android",
UseSpecCompliantProtocol = true
};
var tbOptions = new Dictionary<string, object>
{
["key"] = "api_key",
["secret"] = "api_secret",
["name"] = TestContext.CurrentContext.Test.Name,
["appium:deviceName"] = "Samsung S23"
};
chromeOptions.AddAdditionalCapability("tb:options", tbOptions, true);
driver = new RemoteWebDriver(new Uri("https://hub.testingbot.com/wd/hub"),
chromeOptions.ToCapabilities(), TimeSpan.FromSeconds(600));
We offer special parameters which you can use to allocate a device:
Regex Input | Result |
---|---|
"iPhone.*" |
This will allocate any available iPhone device (phone) |
".*Galaxy.*" |
This will allocate any of the available Galaxy devices (phone or tablet) |
"*" |
This will allocate a random available device, either iOS or Android device |
"iPhone [8-11]" |
This will allocate either an iPhone 8 or 11 |
"iPhone 6.*" |
This will allocate either an iPhone 6 or 6S |
Some Examples:
Device Version
You can specify the version of the device you want to target. In case of physical devices, you might want to use regex/wildcard patterns to target a broad range of devices. This way your chance of hitting an occupied device during your automated test decreases significantly.
Instead of only targetting a specific iOS or Android device, you can target a wider range of devices.
ChromeOptions chromeOpts = new ChromeOptions();
chromeOpts.setExperimentalOption("w3c", true);
MutableCapabilities tbOptions = new MutableCapabilities();
tbOptions.setCapability("key", "api_key");
tbOptions.setCapability("secret", "api_secret");
DesiredCapabilities caps = new DesiredCapabilities();
caps.setCapability(ChromeOptions.CAPABILITY, chromeOpts);
caps.setCapability("appium:platformName", "Android");
caps.setCapability("appium:deviceName", "*");
caps.setCapability("tb:options", tbOptions);
caps.setCapability("appium:version", "(13|14).*");
driver = await new webdriver.Builder().withCapabilities({
"browserName": 'chrome',
"appium:deviceName": '*',
"appium:version": '(13|14).*',
"platformName": 'Android',
"goog:chromeOptions" : { "w3c" : true },
"tb:options": {
"key": "api_key",
"secret": "api_secret"
}
}).usingServer("https://hub.testingbot.com/wd/hub").build();
var chromeOptions = new ChromeOptions()
{
PlatformName = "Android"
};
var tbOptions = new Dictionary<string, object>
{
["key"] = "api_key",
["secret"] = "api_secret",
["name"] = TestContext.CurrentContext.Test.Name,
["deviceName"] = "*"
["version"] = "(13|14).*"
};
chromeOptions.AddAdditionalCapability("tb:options", tbOptions, true);
driver = new RemoteWebDriver(new Uri("https://hub.testingbot.com/wd/hub"),
chromeOptions.ToCapabilities(), TimeSpan.FromSeconds(600));
Some Examples:
// target multiple specific versions of an iPhone device
capabilities.setCapability("appium:deviceName", "iPhone.*");
capabilities.setCapability("appium:version", "15.0|14.2|14|13.4|13.3");
// find any Samsung device with Android version 13 or 14
capabilities.setCapability("appium:deviceName", "Samsung.*");
capabilities.setCapability("appium:version", "(13|14).*");
Tablet Only
You can specify this capability when you only want to allocate a tablet device.
ChromeOptions chromeOpts = new ChromeOptions();
chromeOpts.setExperimentalOption("w3c", true);
MutableCapabilities tbOptions = new MutableCapabilities();
tbOptions.setCapability("key", "api_key");
tbOptions.setCapability("secret", "api_secret");
tbOptions.setCapability("tabletOnly", true);
tbOptions.setCapability("deviceName", "*");
DesiredCapabilities caps = new DesiredCapabilities();
caps.setCapability(ChromeOptions.CAPABILITY, chromeOpts);
caps.setCapability("platformName", "Android");
caps.setCapability("tb:options", tbOptions);
driver = await new webdriver.Builder().withCapabilities({
"browserName": 'chrome',
"deviceName": '*',
"platformName": 'Android',
"goog:chromeOptions" : { "w3c" : true },
"tb:options": {
"key": "api_key",
"secret": "api_secret",
"tabletOnly": true
}
}).usingServer("https://hub.testingbot.com/wd/hub").build();
var chromeOptions = new ChromeOptions()
{
PlatformName = "Android",
UseSpecCompliantProtocol = true
};
var tbOptions = new Dictionary<string, object>
{
["key"] = "api_key",
["secret"] = "api_secret",
["name"] = TestContext.CurrentContext.Test.Name,
["deviceName"] = "*",
["tabletOnly"] = true
};
chromeOptions.AddAdditionalCapability("tb:options", tbOptions, true);
driver = new RemoteWebDriver(new Uri("https://hub.testingbot.com/wd/hub"),
chromeOptions.ToCapabilities(), TimeSpan.FromSeconds(600));
Phone Only
You can specify this capability when you only want to allocate a phone device.
ChromeOptions chromeOpts = new ChromeOptions();
chromeOpts.setExperimentalOption("w3c", true);
MutableCapabilities tbOptions = new MutableCapabilities();
tbOptions.setCapability("key", "api_key");
tbOptions.setCapability("secret", "api_secret");
tbOptions.setCapability("phoneOnly", true);
tbOptions.setCapability("deviceName", "*");
DesiredCapabilities caps = new DesiredCapabilities();
caps.setCapability(ChromeOptions.CAPABILITY, chromeOpts);
caps.setCapability("platformName", "Android");
caps.setCapability("tb:options", tbOptions);
driver = await new webdriver.Builder().withCapabilities({
"browserName": 'chrome',
"deviceName": '*',
"platformName": 'Android',
"goog:chromeOptions" : { "w3c" : true },
"tb:options": {
"key": "api_key",
"secret": "api_secret",
"phoneOnly": true
}
}).usingServer("https://hub.testingbot.com/wd/hub").build();
var chromeOptions = new ChromeOptions()
{
PlatformName = "Android",
UseSpecCompliantProtocol = true
};
var tbOptions = new Dictionary<string, object>
{
["key"] = "api_key",
["secret"] = "api_secret",
["name"] = TestContext.CurrentContext.Test.Name,
["deviceName"] = "*",
["phoneOnly"] = true
};
chromeOptions.AddAdditionalCapability("tb:options", tbOptions, true);
driver = new RemoteWebDriver(new Uri("https://hub.testingbot.com/wd/hub"),
chromeOptions.ToCapabilities(), TimeSpan.FromSeconds(600));
Use a specific version of Selenium
By default we use Selenium version 2.53.1
to run your test.
If you wish to use another Selenium version for your test, please specify one of the following available versions:
ChromeOptions chromeOpts = new ChromeOptions();
chromeOpts.setExperimentalOption("w3c", true);
MutableCapabilities tbOptions = new MutableCapabilities();
tbOptions.setCapability("key", "api_key");
tbOptions.setCapability("secret", "api_secret");
tbOptions.setCapability("selenium-version", '2.53.1');
DesiredCapabilities caps = new DesiredCapabilities();
caps.setCapability(ChromeOptions.CAPABILITY, chromeOpts);
caps.setCapability("platformName", "Windows 10");
caps.setCapability("tb:options", tbOptions);
caps.setCapability("browserName", "chrome");
driver = await new webdriver.Builder().withCapabilities({
"browserName": 'chrome',
"platformName": 'Windows 10',
/** Google requires "w3c" to be set in "goog:chromeOptions" as true if you're using ChromeDriver version 74 or lower.
* Based on this commit: https://chromium.googlesource.com/chromium/src/+/2b49880e2481658e0702fd6fe494859bca52b39c
* ChromeDriver now uses w3c by default from version 75+ so setting this option will no longer be a requirement **/
"goog:chromeOptions" : { "w3c" : true },
"tb:options": {
"key": "api_key",
"secret": "api_secret",
"selenium-version": '2.53.1'
}
}).usingServer("https://hub.testingbot.com/wd/hub").build();
var chromeOptions = new ChromeOptions()
{
BrowserVersion = "81",
PlatformName = "Windows 10",
UseSpecCompliantProtocol = true
};
var tbOptions = new Dictionary<string, object>
{
["key"] = "api_key",
["secret"] = "api_secret",
["selenium-version"] = "2.53.1"
};
chromeOptions.AddAdditionalCapability("tb:options", tbOptions, true);
driver = new RemoteWebDriver(new Uri("https://hub.testingbot.com/wd/hub"),
chromeOptions.ToCapabilities(), TimeSpan.FromSeconds(600));
Value Type | Default Value | Possible Values: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
string | "2.53.1" |
|
Chromedriver
We support using custom ChromeDriver versions during your tests. By default the most recent Chromedriver is used according to the version of Chrome you're testing on.
If you are looking to download Chromedriver for local testing, please see this url to download chromedriver.
ChromeOptions chromeOpts = new ChromeOptions();
chromeOpts.setExperimentalOption("w3c", true);
MutableCapabilities tbOptions = new MutableCapabilities();
tbOptions.setCapability("key", "api_key");
tbOptions.setCapability("secret", "api_secret");
tbOptions.setCapability("chromedriverVersion", "76.0.3809.25");
DesiredCapabilities caps = new DesiredCapabilities();
caps.setCapability(ChromeOptions.CAPABILITY, chromeOpts);
caps.setCapability("platformName", "Windows 10");
caps.setCapability("tb:options", tbOptions);
caps.setCapability("browserName", "chrome");
driver = await new webdriver.Builder().withCapabilities({
"browserName": 'chrome',
"platformName": 'Windows 10',
/** Google requires "w3c" to be set in "goog:chromeOptions" as true if you're using ChromeDriver version 74 or lower.
* Based on this commit: https://chromium.googlesource.com/chromium/src/+/2b49880e2481658e0702fd6fe494859bca52b39c
* ChromeDriver now uses w3c by default from version 75+ so setting this option will no longer be a requirement **/
"goog:chromeOptions" : { "w3c" : true },
"tb:options": {
"key": "api_key",
"secret": "api_secret",
"chromedriverVersion": "76.0.3809.25"
}
}).usingServer("https://hub.testingbot.com/wd/hub").build();
var chromeOptions = new ChromeOptions()
{
BrowserVersion = "81",
PlatformName = "Windows 10"
};
var tbOptions = new Dictionary<string, object>
{
["key"] = "api_key",
["secret"] = "api_secret",
["chromedriverVersion"] = "76.0.3809.25"
};
chromeOptions.AddAdditionalCapability("tb:options", tbOptions, true);
driver = new RemoteWebDriver(new Uri("https://hub.testingbot.com/wd/hub"),
chromeOptions.ToCapabilities(), TimeSpan.FromSeconds(600));
Value Type | Default Value | Possible Values: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
string | "2.46" |
|
Internet Explorer Driver (IEDriver)
We provide both 32-bit and 64-bit versions of the Internet Explorer driver. By default we use the 2.53.1 (32-bit) IEDriver for your tests.
We use 32-bit because of a slow text entry bug with the 64-bit version.
For our screenshots, we use the 64-bit version, because of a screenshot problem with the 32-bit version.
InternetExplorerOptions ieOpts = new InternetExplorerOptions();
MutableCapabilities tbOptions = new MutableCapabilities();
tbOptions.setCapability("key", "api_key");
tbOptions.setCapability("secret", "api_secret");
tbOptions.setCapability("iedriverVersion", "4.8.0");
tbOptions.setCapability("selenium-version", "4.8.0");
DesiredCapabilities caps = new DesiredCapabilities();
caps.setCapability("se:ieOptions", ieOpts);
caps.setCapability("platformName", "Windows 10");
caps.setCapability("tb:options", tbOptions);
caps.setCapability("browserName", "internet explorer");
driver = await new webdriver.Builder().withCapabilities({
"browserName": 'internet explorer',
"platformName": 'Windows 10',
"se:ieOptions" : {},
"tb:options": {
"key": "api_key",
"secret": "api_secret",
"iedriverVersion": "4.8.0",
"selenium-version": "4.8.0"
}
}).usingServer("https://hub.testingbot.com/wd/hub").build();
var ieOptions = new InternetExplorerOptions()
{
BrowserVersion = "11",
PlatformName = "Windows 10",
UseSpecCompliantProtocol = true
};
var tbOptions = new Dictionary<string, object>
{
["key"] = "api_key",
["secret"] = "api_secret",
["iedriverVersion"] = "4.8.0",
["selenium-version"] = "4.8.0"
};
ieOptions.AddAdditionalCapability("tb:options", tbOptions, true);
driver = new RemoteWebDriver(new Uri("https://hub.testingbot.com/wd/hub"),
ieOptions.ToCapabilities(), TimeSpan.FromSeconds(600));
Value Type | Default Value | Possible Values: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
string | 2.53.1 |
|
Edge Driver (MicrosoftWebDriver)
EdgeDriver is built by Microsoft to automate the Microsoft Edge Browser.
By default, we make sure that the most recent fully-compatible EdgeDriver is used for every test running on the Microsoft Edge Browser.
var edgeOptions = new EdgeOptions()
{
BrowserVersion = "11",
PlatformName = "Windows 10",
UseSpecCompliantProtocol = true
};
var tbOptions = new Dictionary<string, object>
{
["key"] = "api_key",
["secret"] = "api_secret",
["edgeDriverVersion"] = "110",
["selenium-version"] = "4.8.0"
};
edgeOptions.AddAdditionalCapability("tb:options", tbOptions, true);
driver = new RemoteWebDriver(new Uri("https://hub.testingbot.com/wd/hub"),
edgeOptions.ToCapabilities(), TimeSpan.FromSeconds(600));
EdgeOptions edgeOpts = new EdgeOptions();
edgeOpts.setExperimentalOption("w3c", true);
MutableCapabilities tbOptions = new MutableCapabilities();
tbOptions.setCapability("key", "api_key");
tbOptions.setCapability("secret", "api_secret");
tbOptions.setCapability("edgedriverVersion", "110");
DesiredCapabilities caps = new DesiredCapabilities();
caps.setCapability(EdgeOptions.CAPABILITY, edgeOpts);
caps.setCapability("platformName", "Windows 10");
caps.setCapability("tb:options", tbOptions);
caps.setCapability("browserName", "chrome");
$options = new EdgeOptions();
$capabilities = DesiredCapabilities::chrome();
$capabilities->setPlatform('Windows 10');
$capabilities->setCapability('tb:options', array(
'edgedriverVersion' => "110"
));
$capabilities->setCapability('ms:edgeOptions', array());
$capabilities->setCapability(EdgeOptions::CAPABILITY, $options);
var edgeOptions = new EdgeOptions()
{
BrowserVersion = "latest",
PlatformName = "Windows 10",
UseSpecCompliantProtocol = true
};
var tbOptions = new Dictionary<string, object>
{
["key"] = "api_key",
["secret"] = "api_secret",
["edgedriverVersion"] = "110"
};
edgeOptions.AddAdditionalCapability("tb:options", tbOptions, true);
driver = new RemoteWebDriver(new Uri("https://hub.testingbot.com/wd/hub"),
edgeOptions.ToCapabilities(), TimeSpan.FromSeconds(600));
Value Type | Default Value | Possible Values: | ||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
string | 15063 |
|
Firefox Driver (Geckodriver)
For Firefox 47 and up, webdriver tests on Firefox need to use Mozilla's GeckoDriver.
Specify this option to choose which Geckodriver we should use. By default, we use the version that is most compatible with the Firefox version you request.
FirefoxOptions ffOptions = new FirefoxOptions();
ffOptions.setExperimentalOption("w3c", true);
MutableCapabilities tbOptions = new MutableCapabilities();
tbOptions.setCapability("key", "api_key");
tbOptions.setCapability("secret", "api_secret");
tbOptions.setCapability("geckodriverVersion", "0.28.0");
DesiredCapabilities caps = new DesiredCapabilities();
caps.setCapability(FirefoxOptions.CAPABILITY, ffOptions);
caps.setCapability("platformName", "Windows 10");
caps.setCapability("tb:options", tbOptions);
caps.setCapability("browserName", "firefox");
$options = new FirefoxOptions();
$capabilities = DesiredCapabilities::firefox();
$capabilities->setPlatform('Windows 10');
$capabilities->setCapability('tb:options', array(
'geckodriverVersion' => "0.28.0"
));
$capabilities->setCapability('moz:firefoxOptions', array());
$capabilities->setCapability(FirefoxOptions::CAPABILITY, $options);
var ffOptions = new FirefoxOptions()
{
BrowserVersion = "latest",
PlatformName = "Windows 10",
UseSpecCompliantProtocol = true
};
var tbOptions = new Dictionary<string, object>
{
["key"] = "api_key",
["secret"] = "api_secret",
["geckodriverVersion"] = "0.28.0"
};
ffOptions.AddAdditionalCapability("tb:options", tbOptions, true);
driver = new RemoteWebDriver(new Uri("https://hub.testingbot.com/wd/hub"),
ffOptions.ToCapabilities(), TimeSpan.FromSeconds(600));
Value Type | Default Value | Possible Values: | |||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
string | 0.28.0 |
|
Opera Driver
Opera uses the Chromium OperaDriver to automate Opera Desktop Browsers.
Specify this option to choose which OperaDriver we should use. By default, we use the version that is most compatible with the Opera version you request.
OperaOptions operaOpts = new OperaOptions();
MutableCapabilities tbOptions = new MutableCapabilities();
tbOptions.setCapability("key", "api_key");
tbOptions.setCapability("secret", "api_secret");
tbOptions.setCapability("operaDriverVersion", "90.0.4430.85");
DesiredCapabilities caps = new DesiredCapabilities();
caps.setCapability(OperaOptions.CAPABILITY, chromeOpts);
caps.setCapability("platformName", "Windows 10");
caps.setCapability("tb:options", tbOptions);
caps.setCapability("browserName", "opera");
$options = new ChromeOptions();
$capabilities = DesiredCapabilities::chrome();
$capabilities->setPlatform('Windows 10');
$capabilities->setBrowserName('opera');
$capabilities->setCapability('tb:options', array(
'operaDriverVersion' => "90.0.4430.85"
));
$capabilities->setCapability(ChromeOptions::CAPABILITY, $options);
var operaOptions = new OperaOptions()
{
BrowserVersion = "81",
PlatformName = "Windows 10",
UseSpecCompliantProtocol = true
};
var tbOptions = new Dictionary<string, object>
{
["key"] = "api_key",
["secret"] = "api_secret",
["operaDriverVersion"] = "90.0.4430.85"
};
chromeOptions.AddAdditionalCapability("tb:options", tbOptions, true);
driver = new RemoteWebDriver(new Uri("https://hub.testingbot.com/wd/hub"),
operaOptions.ToCapabilities(), TimeSpan.FromSeconds(600));
Value Type | Default Value | Possible Values: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
string | 87.0.4280.67 |
|
Taking screenshots during your tests
By default we do not capture screenshots at every step of your test.
If you wish to take a screenshot for every step, please add this capability (set to true
) to your request.
ChromeOptions chromeOpts = new ChromeOptions();
chromeOpts.setExperimentalOption("w3c", true);
MutableCapabilities tbOptions = new MutableCapabilities();
tbOptions.setCapability("key", "api_key");
tbOptions.setCapability("secret", "api_secret");
tbOptions.setCapability("screenshot", true);
DesiredCapabilities caps = new DesiredCapabilities();
caps.setCapability(ChromeOptions.CAPABILITY, chromeOpts);
caps.setCapability("platformName", "Windows 10");
caps.setCapability("tb:options", tbOptions);
caps.setCapability("browserName", "chrome");
driver = await new webdriver.Builder().withCapabilities({
"browserName": 'chrome',
"platformName": 'Windows 10',
/** Google requires "w3c" to be set in "goog:chromeOptions" as true if you're using ChromeDriver version 74 or lower.
* Based on this commit: https://chromium.googlesource.com/chromium/src/+/2b49880e2481658e0702fd6fe494859bca52b39c
* ChromeDriver now uses w3c by default from version 75+ so setting this option will no longer be a requirement **/
"goog:chromeOptions" : { "w3c" : true },
"tb:options": {
"key": "api_key",
"secret": "api_secret",
"screenshot": true
}
}).usingServer("https://hub.testingbot.com/wd/hub").build();
var chromeOptions = new ChromeOptions()
{
BrowserVersion = "81",
PlatformName = "Windows 10",
UseSpecCompliantProtocol = true
};
var tbOptions = new Dictionary<string, object>
{
["key"] = "api_key",
["secret"] = "api_secret",
["screenshot"] = true
};
chromeOptions.AddAdditionalCapability("tb:options", tbOptions, true);
driver = new RemoteWebDriver(new Uri("https://hub.testingbot.com/wd/hub"),
chromeOptions.ToCapabilities(), TimeSpan.FromSeconds(600));
Value Type | Default Value |
---|---|
boolean | false |
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.
ChromeOptions chromeOpts = new ChromeOptions();
chromeOpts.setExperimentalOption("w3c", true);
MutableCapabilities tbOptions = new MutableCapabilities();
tbOptions.setCapability("key", "api_key");
tbOptions.setCapability("secret", "api_secret");
tbOptions.setCapability("screenrecorder", true);
DesiredCapabilities caps = new DesiredCapabilities();
caps.setCapability(ChromeOptions.CAPABILITY, chromeOpts);
caps.setCapability("platformName", "Windows 10");
caps.setCapability("tb:options", tbOptions);
caps.setCapability("browserName", "chrome");
driver = await new webdriver.Builder().withCapabilities({
"browserName": 'chrome',
"platformName": 'Windows 10',
/** Google requires "w3c" to be set in "goog:chromeOptions" as true if you're using ChromeDriver version 74 or lower.
* Based on this commit: https://chromium.googlesource.com/chromium/src/+/2b49880e2481658e0702fd6fe494859bca52b39c
* ChromeDriver now uses w3c by default from version 75+ so setting this option will no longer be a requirement **/
"goog:chromeOptions" : { "w3c" : true },
"tb:options": {
"key": "api_key",
"secret": "api_secret",
"screenrecorder": true
}
}).usingServer("https://hub.testingbot.com/wd/hub").build();
var chromeOptions = new ChromeOptions()
{
BrowserVersion = "81",
PlatformName = "Windows 10",
UseSpecCompliantProtocol = true
};
var tbOptions = new Dictionary<string, object>
{
["key"] = "api_key",
["secret"] = "api_secret",
["screenrecorder"] = true
};
chromeOptions.AddAdditionalCapability("tb:options", tbOptions, true);
driver = new RemoteWebDriver(new Uri("https://hub.testingbot.com/wd/hub"),
chromeOptions.ToCapabilities(), TimeSpan.FromSeconds(600));
Value Type | Default Value |
---|---|
boolean | true |
Test Privacy
Make the test results for this test public so that everyone can access the results.
ChromeOptions chromeOpts = new ChromeOptions();
chromeOpts.setExperimentalOption("w3c", true);
MutableCapabilities tbOptions = new MutableCapabilities();
tbOptions.setCapability("key", "api_key");
tbOptions.setCapability("secret", "api_secret");
tbOptions.setCapability("public", false);
DesiredCapabilities caps = new DesiredCapabilities();
caps.setCapability(ChromeOptions.CAPABILITY, chromeOpts);
caps.setCapability("platformName", "Windows 10");
caps.setCapability("tb:options", tbOptions);
caps.setCapability("browserName", "chrome");
driver = await new webdriver.Builder().withCapabilities({
"browserName": 'chrome',
"platformName": 'Windows 10',
/** Google requires "w3c" to be set in "goog:chromeOptions" as true if you're using ChromeDriver version 74 or lower.
* Based on this commit: https://chromium.googlesource.com/chromium/src/+/2b49880e2481658e0702fd6fe494859bca52b39c
* ChromeDriver now uses w3c by default from version 75+ so setting this option will no longer be a requirement **/
"goog:chromeOptions" : { "w3c" : true },
"tb:options": {
"key": "api_key",
"secret": "api_secret",
"public": false
}
}).usingServer("https://hub.testingbot.com/wd/hub").build();
var chromeOptions = new ChromeOptions()
{
BrowserVersion = "81",
PlatformName = "Windows 10",
UseSpecCompliantProtocol = true
};
var tbOptions = new Dictionary<string, object>
{
["key"] = "api_key",
["secret"] = "api_secret",
["public"] = false
};
chromeOptions.AddAdditionalCapability("tb:options", tbOptions, true);
driver = new RemoteWebDriver(new Uri("https://hub.testingbot.com/wd/hub"),
chromeOptions.ToCapabilities(), TimeSpan.FromSeconds(600));
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.
ChromeOptions chromeOpts = new ChromeOptions();
chromeOpts.setExperimentalOption("w3c", true);
MutableCapabilities tbOptions = new MutableCapabilities();
tbOptions.setCapability("key", "api_key");
tbOptions.setCapability("secret", "api_secret");
tbOptions.setCapability("blacklist", "site1.com,site2.com");
DesiredCapabilities caps = new DesiredCapabilities();
caps.setCapability(ChromeOptions.CAPABILITY, chromeOpts);
caps.setCapability("platformName", "Windows 10");
caps.setCapability("tb:options", tbOptions);
caps.setCapability("browserName", "chrome");
driver = await new webdriver.Builder().withCapabilities({
"browserName": 'chrome',
"platformName": 'Windows 10',
/** Google requires "w3c" to be set in "goog:chromeOptions" as true if you're using ChromeDriver version 74 or lower.
* Based on this commit: https://chromium.googlesource.com/chromium/src/+/2b49880e2481658e0702fd6fe494859bca52b39c
* ChromeDriver now uses w3c by default from version 75+ so setting this option will no longer be a requirement **/
"goog:chromeOptions" : { "w3c" : true },
"tb:options": {
"key": "api_key",
"secret": "api_secret",
"blacklist": "site1.com,site2.com"
}
}).usingServer("https://hub.testingbot.com/wd/hub").build();
var chromeOptions = new ChromeOptions()
{
BrowserVersion = "81",
PlatformName = "Windows 10",
UseSpecCompliantProtocol = true
};
var tbOptions = new Dictionary<string, object>
{
["key"] = "api_key",
["secret"] = "api_secret",
["blacklist"] = "site1.com,site2.com"
};
chromeOptions.AddAdditionalCapability("tb:options", tbOptions, true);
driver = new RemoteWebDriver(new Uri("https://hub.testingbot.com/wd/hub"),
chromeOptions.ToCapabilities(), TimeSpan.FromSeconds(600));
Value Type |
---|
string (comma-separated) |
Customize Logging
By default, TestingBot records logs of all Selenium actions and its drivers.
Set this option to false
if you don't want TestingBot to record anything (for example, if you have sensitive data).
You will not see any test logs in our member dashboard.
Set to strip-parameters
to prevent the POST/GET parameters from being logged on the TestingBot test detail page (does not affect other logs like Selenium logs, Chromedriver logs, ...).
ChromeOptions chromeOpts = new ChromeOptions();
chromeOpts.setExperimentalOption("w3c", true);
MutableCapabilities tbOptions = new MutableCapabilities();
tbOptions.setCapability("key", "api_key");
tbOptions.setCapability("secret", "api_secret");
tbOptions.setCapability("recordLogs", true);
DesiredCapabilities caps = new DesiredCapabilities();
caps.setCapability(ChromeOptions.CAPABILITY, chromeOpts);
caps.setCapability("platformName", "Windows 10");
caps.setCapability("tb:options", tbOptions);
caps.setCapability("browserName", "chrome");
driver = await new webdriver.Builder().withCapabilities({
"browserName": 'chrome',
"platformName": 'Windows 10',
/** Google requires "w3c" to be set in "goog:chromeOptions" as true if you're using ChromeDriver version 74 or lower.
* Based on this commit: https://chromium.googlesource.com/chromium/src/+/2b49880e2481658e0702fd6fe494859bca52b39c
* ChromeDriver now uses w3c by default from version 75+ so setting this option will no longer be a requirement **/
"goog:chromeOptions" : { "w3c" : true },
"tb:options": {
"key": "api_key",
"secret": "api_secret",
"recordLogs": true
}
}).usingServer("https://hub.testingbot.com/wd/hub").build();
var chromeOptions = new ChromeOptions()
{
BrowserVersion = "81",
PlatformName = "Windows 10",
UseSpecCompliantProtocol = true
};
var tbOptions = new Dictionary<string, object>
{
["key"] = "api_key",
["secret"] = "api_secret",
["recordLogs"] = true
};
chromeOptions.AddAdditionalCapability("tb:options", tbOptions, true);
driver = new RemoteWebDriver(new Uri("https://hub.testingbot.com/wd/hub"),
chromeOptions.ToCapabilities(), TimeSpan.FromSeconds(600));
Value Type | Default Value | Possible Values: |
---|---|---|
string | "true" |
true , false , or strip-parameters
|
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:
ChromeOptions chromeOpts = new ChromeOptions();
chromeOpts.setExperimentalOption("w3c", true);
MutableCapabilities tbOptions = new MutableCapabilities();
tbOptions.setCapability("key", "api_key");
tbOptions.setCapability("secret", "api_secret");
tbOptions.setCapability("timeZone", "Etc/UTC");
DesiredCapabilities caps = new DesiredCapabilities();
caps.setCapability(ChromeOptions.CAPABILITY, chromeOpts);
caps.setCapability("platformName", "Windows 10");
caps.setCapability("tb:options", tbOptions);
caps.setCapability("browserName", "chrome");
driver = await new webdriver.Builder().withCapabilities({
"browserName": 'chrome',
"platformName": 'Windows 10',
/** Google requires "w3c" to be set in "goog:chromeOptions" as true if you're using ChromeDriver version 74 or lower.
* Based on this commit: https://chromium.googlesource.com/chromium/src/+/2b49880e2481658e0702fd6fe494859bca52b39c
* ChromeDriver now uses w3c by default from version 75+ so setting this option will no longer be a requirement **/
"goog:chromeOptions" : { "w3c" : true },
"tb:options": {
"key": "api_key",
"secret": "api_secret",
"timeZone": "Etc/UTC"
}
}).usingServer("https://hub.testingbot.com/wd/hub").build();
var chromeOptions = new ChromeOptions()
{
BrowserVersion = "81",
PlatformName = "Windows 10",
UseSpecCompliantProtocol = true
};
var tbOptions = new Dictionary<string, object>
{
["key"] = "api_key",
["secret"] = "api_secret",
["timeZone"] = "Etc/UTC"
};
chromeOptions.AddAdditionalCapability("tb:options", tbOptions, true);
driver = new RemoteWebDriver(new Uri("https://hub.testingbot.com/wd/hub"),
chromeOptions.ToCapabilities(), TimeSpan.FromSeconds(600));
Value Type | Default Value | Possible Values: |
---|---|---|
string | "Etc/UTC" | List of timezones |
Change Screen Resolution
Will adjust the screen resolution during your test.
ChromeOptions chromeOpts = new ChromeOptions();
chromeOpts.setExperimentalOption("w3c", true);
MutableCapabilities tbOptions = new MutableCapabilities();
tbOptions.setCapability("key", "api_key");
tbOptions.setCapability("secret", "api_secret");
tbOptions.setCapability("screen-resolution", "1280x1024");
DesiredCapabilities caps = new DesiredCapabilities();
caps.setCapability(ChromeOptions.CAPABILITY, chromeOpts);
caps.setCapability("platformName", "Windows 10");
caps.setCapability("tb:options", tbOptions);
caps.setCapability("browserName", "chrome");
driver = await new webdriver.Builder().withCapabilities({
"browserName": 'chrome',
"platformName": 'Windows 10',
/** Google requires "w3c" to be set in "goog:chromeOptions" as true if you're using ChromeDriver version 74 or lower.
* Based on this commit: https://chromium.googlesource.com/chromium/src/+/2b49880e2481658e0702fd6fe494859bca52b39c
* ChromeDriver now uses w3c by default from version 75+ so setting this option will no longer be a requirement **/
"goog:chromeOptions" : { "w3c" : true },
"tb:options": {
"key": "api_key",
"secret": "api_secret",
"screen-resolution": "1280x1024"
}
}).usingServer("https://hub.testingbot.com/wd/hub").build();
var chromeOptions = new ChromeOptions()
{
BrowserVersion = "81",
PlatformName = "Windows 10",
UseSpecCompliantProtocol = true
};
var tbOptions = new Dictionary<string, object>
{
["key"] = "api_key",
["secret"] = "api_secret",
["screen-resolution"] = "1280x1024"
};
chromeOptions.AddAdditionalCapability("tb:options", tbOptions, true);
driver = new RemoteWebDriver(new Uri("https://hub.testingbot.com/wd/hub"),
chromeOptions.ToCapabilities(), TimeSpan.FromSeconds(600));
Value Type | Default Value | |||||||
---|---|---|---|---|---|---|---|---|
string | "1280x1024" |
|
Customize OS
When you specify a prerun file, we will first download the file and execute it (with optional prerun-arguments).
This is useful when you want to customize/add software before your test starts.
ChromeOptions chromeOpts = new ChromeOptions();
chromeOpts.setExperimentalOption("w3c", true);
MutableCapabilities tbOptions = new MutableCapabilities();
tbOptions.setCapability("key", "api_key");
tbOptions.setCapability("secret", "api_secret");
tbOptions.setCapability("prerun", "https://...");
DesiredCapabilities caps = new DesiredCapabilities();
caps.setCapability(ChromeOptions.CAPABILITY, chromeOpts);
caps.setCapability("platformName", "Windows 10");
caps.setCapability("tb:options", tbOptions);
caps.setCapability("browserName", "chrome");
driver = await new webdriver.Builder().withCapabilities({
"browserName": 'chrome',
"platformName": 'Windows 10',
/** Google requires "w3c" to be set in "goog:chromeOptions" as true if you're using ChromeDriver version 74 or lower.
* Based on this commit: https://chromium.googlesource.com/chromium/src/+/2b49880e2481658e0702fd6fe494859bca52b39c
* ChromeDriver now uses w3c by default from version 75+ so setting this option will no longer be a requirement **/
"goog:chromeOptions" : { "w3c" : true },
"tb:options": {
"key": "api_key",
"secret": "api_secret",
"prerun": "https://..."
}
}).usingServer("https://hub.testingbot.com/wd/hub").build();
var chromeOptions = new ChromeOptions()
{
BrowserVersion = "81",
PlatformName = "Windows 10",
UseSpecCompliantProtocol = true
};
var tbOptions = new Dictionary<string, object>
{
["key"] = "api_key",
["secret"] = "api_secret",
["prerun"] = "https://..."
};
chromeOptions.AddAdditionalCapability("tb:options", tbOptions, true);
driver = new RemoteWebDriver(new Uri("https://hub.testingbot.com/wd/hub"),
chromeOptions.ToCapabilities(), TimeSpan.FromSeconds(600));
Value Type |
---|
string (URL) |
Value Type |
---|
string |
With TestingBot Storage, you can upload your executable on our servers.
The advantage of this is that our test VMs can immediately download your executable from our own network, which is much faster than downloading from the public internet.
Once the file is uploaded via TestingBot Storage, you can use"prerun" : "tb://..."
Edit hostnames
You can specify an array of objects containing the keys ip
and domain
. We will write these values to the hosts file of the VM.
ChromeOptions chromeOpts = new ChromeOptions();
chromeOpts.setExperimentalOption("w3c", true);
MutableCapabilities tbOptions = new MutableCapabilities();
tbOptions.setCapability("key", "api_key");
tbOptions.setCapability("secret", "api_secret");
tbOptions.setCapability("hosts", [{ ip: '127.0.0.1', domain: 'mydomain' }]);
DesiredCapabilities caps = new DesiredCapabilities();
caps.setCapability(ChromeOptions.CAPABILITY, chromeOpts);
caps.setCapability("platformName", "Windows 10");
caps.setCapability("tb:options", tbOptions);
caps.setCapability("browserName", "chrome");
driver = await new webdriver.Builder().withCapabilities({
"browserName": 'chrome',
"platformName": 'Windows 10',
/** Google requires "w3c" to be set in "goog:chromeOptions" as true if you're using ChromeDriver version 74 or lower.
* Based on this commit: https://chromium.googlesource.com/chromium/src/+/2b49880e2481658e0702fd6fe494859bca52b39c
* ChromeDriver now uses w3c by default from version 75+ so setting this option will no longer be a requirement **/
"goog:chromeOptions" : { "w3c" : true },
"tb:options": {
"key": "api_key",
"secret": "api_secret",
"hosts": [{ ip: '127.0.0.1', domain: 'mydomain' }]
}
}).usingServer("https://hub.testingbot.com/wd/hub").build();
var chromeOptions = new ChromeOptions()
{
BrowserVersion = "81",
PlatformName = "Windows 10",
UseSpecCompliantProtocol = true
};
var tbOptions = new Dictionary<string, object>
{
["key"] = "api_key",
["secret"] = "api_secret",
["hosts"] = [{ ip: '127.0.0.1', domain: 'mydomain' }]
};
chromeOptions.AddAdditionalCapability("tb:options", tbOptions, true);
driver = new RemoteWebDriver(new Uri("https://hub.testingbot.com/wd/hub"),
chromeOptions.ToCapabilities(), TimeSpan.FromSeconds(600));
Value Type |
---|
array of objects ({ ip: "", domain: "" })
|
Upload file
When you specify an URL (upload
) and fileName (uploadFilepath
), we will automatically download the file from the URL and save it in the uploadFilepath.
ChromeOptions chromeOpts = new ChromeOptions();
chromeOpts.setExperimentalOption("w3c", true);
MutableCapabilities tbOptions = new MutableCapabilities();
tbOptions.setCapability("key", "api_key");
tbOptions.setCapability("secret", "api_secret");
tbOptions.setCapability("upload", "https://...");
DesiredCapabilities caps = new DesiredCapabilities();
caps.setCapability(ChromeOptions.CAPABILITY, chromeOpts);
caps.setCapability("platformName", "Windows 10");
caps.setCapability("tb:options", tbOptions);
caps.setCapability("browserName", "chrome");
driver = await new webdriver.Builder().withCapabilities({
"browserName": 'chrome',
"platformName": 'Windows 10',
/** Google requires "w3c" to be set in "goog:chromeOptions" as true if you're using ChromeDriver version 74 or lower.
* Based on this commit: https://chromium.googlesource.com/chromium/src/+/2b49880e2481658e0702fd6fe494859bca52b39c
* ChromeDriver now uses w3c by default from version 75+ so setting this option will no longer be a requirement **/
"goog:chromeOptions" : { "w3c" : true },
"tb:options": {
"key": "api_key",
"secret": "api_secret",
"upload": "https://..."
}
}).usingServer("https://hub.testingbot.com/wd/hub").build();
var chromeOptions = new ChromeOptions()
{
BrowserVersion = "81",
PlatformName = "Windows 10",
UseSpecCompliantProtocol = true
};
var tbOptions = new Dictionary<string, object>
{
["key"] = "api_key",
["secret"] = "api_secret",
["upload"] = "https://..."
};
chromeOptions.AddAdditionalCapability("tb:options", tbOptions, true);
driver = new RemoteWebDriver(new Uri("https://hub.testingbot.com/wd/hub"),
chromeOptions.ToCapabilities(), TimeSpan.FromSeconds(600));
Value Type |
---|
string (URL) |
We recommend using these directories to save your files: For Windows (C:\test\
), for Linux/macOS: (/tmp/
).
Example: Example (Selenium 4):You can also use the home directory tilde to specify the user's directory:
~/Desktop/sample.pdf
Value Type |
---|
string (URL) |
Upload Multiple Files
Specify an array of objects, containing keys url
and filePath
. We will automatically download these files and put them in the filePaths you specify.
We recommend using these directories to save your files: For Windows (C:\test\
), for Linux/macOS: (/tmp/
).
You can also use the home directory tilde to specify the user's directory:
~/Desktop/sample.pdf
ChromeOptions chromeOpts = new ChromeOptions();
chromeOpts.setExperimentalOption("w3c", true);
MutableCapabilities tbOptions = new MutableCapabilities();
tbOptions.setCapability("key", "api_key");
tbOptions.setCapability("secret", "api_secret");
tbOptions.setCapability("uploadMultiple", [{ url: "", filePath: "" }]);
DesiredCapabilities caps = new DesiredCapabilities();
caps.setCapability(ChromeOptions.CAPABILITY, chromeOpts);
caps.setCapability("platformName", "Windows 10");
caps.setCapability("tb:options", tbOptions);
caps.setCapability("browserName", "chrome");
driver = await new webdriver.Builder().withCapabilities({
"browserName": 'chrome',
"platformName": 'Windows 10',
/** Google requires "w3c" to be set in "goog:chromeOptions" as true if you're using ChromeDriver version 74 or lower.
* Based on this commit: https://chromium.googlesource.com/chromium/src/+/2b49880e2481658e0702fd6fe494859bca52b39c
* ChromeDriver now uses w3c by default from version 75+ so setting this option will no longer be a requirement **/
"goog:chromeOptions" : { "w3c" : true },
"tb:options": {
"key": "api_key",
"secret": "api_secret",
"uploadMultiple": [{ url: "", filePath: "" }]
}
}).usingServer("https://hub.testingbot.com/wd/hub").build();
var chromeOptions = new ChromeOptions()
{
BrowserVersion = "81",
PlatformName = "Windows 10",
UseSpecCompliantProtocol = true
};
var tbOptions = new Dictionary<string, object>
{
["key"] = "api_key",
["secret"] = "api_secret",
["uploadMultiple"] = [{ url: "", filePath: "" }]
};
chromeOptions.AddAdditionalCapability("tb:options", tbOptions, true);
driver = new RemoteWebDriver(new Uri("https://hub.testingbot.com/wd/hub"),
chromeOptions.ToCapabilities(), TimeSpan.FromSeconds(600));
Value Type |
---|
array of objects, { url: "", filePath: "" }
|
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.
ChromeOptions chromeOpts = new ChromeOptions();
chromeOpts.setExperimentalOption("w3c", true);
MutableCapabilities tbOptions = new MutableCapabilities();
tbOptions.setCapability("key", "api_key");
tbOptions.setCapability("secret", "api_secret");
tbOptions.setCapability("testingbot.geoCountryCode", "DE");
DesiredCapabilities caps = new DesiredCapabilities();
caps.setCapability(ChromeOptions.CAPABILITY, chromeOpts);
caps.setCapability("platformName", "Windows 10");
caps.setCapability("tb:options", tbOptions);
caps.setCapability("browserName", "chrome");
driver = await new webdriver.Builder().withCapabilities({
"browserName": 'chrome',
"platformName": 'Windows 10',
/** Google requires "w3c" to be set in "goog:chromeOptions" as true if you're using ChromeDriver version 74 or lower.
* Based on this commit: https://chromium.googlesource.com/chromium/src/+/2b49880e2481658e0702fd6fe494859bca52b39c
* ChromeDriver now uses w3c by default from version 75+ so setting this option will no longer be a requirement **/
"goog:chromeOptions" : { "w3c" : true },
"tb:options": {
"key": "api_key",
"secret": "api_secret",
"testingbot.geoCountryCode": "DE"
}
}).usingServer("https://hub.testingbot.com/wd/hub").build();
var chromeOptions = new ChromeOptions()
{
BrowserVersion = "81",
PlatformName = "Windows 10",
UseSpecCompliantProtocol = true
};
var tbOptions = new Dictionary<string, object>
{
["key"] = "api_key",
["secret"] = "api_secret",
["testingbot.geoCountryCode"] = "DE"
};
chromeOptions.AddAdditionalCapability("tb:options", tbOptions, true);
driver = new RemoteWebDriver(new Uri("https://hub.testingbot.com/wd/hub"),
chromeOptions.ToCapabilities(), TimeSpan.FromSeconds(600));
Specify testingbot.geoCountryCode
with one of the following country codes:
- '*': this will take a random country from the list below
- 'AU': Australia
- 'BH': Bahrain
- 'BE': Belgium
- 'BR': Brazil
- 'CN': China
- 'FR': France
- 'DE': Germany
- 'IN': India
- 'IT': Italy
- 'JP': Japan
- 'SG': Singapore
- 'ZA': South Africa
- 'ES': Spain
- 'SE': Sweden
- 'AE': United Arab Emirates
- 'GB': United Kingdom
- 'US': United States
Important: this does not work on Android 4.4
Change Test Name
Add a name to this test, which will show up in our member area and API.
ChromeOptions chromeOpts = new ChromeOptions();
chromeOpts.setExperimentalOption("w3c", true);
MutableCapabilities tbOptions = new MutableCapabilities();
tbOptions.setCapability("key", "api_key");
tbOptions.setCapability("secret", "api_secret");
tbOptions.setCapability("name", "My Test Name");
DesiredCapabilities caps = new DesiredCapabilities();
caps.setCapability(ChromeOptions.CAPABILITY, chromeOpts);
caps.setCapability("platformName", "Windows 10");
caps.setCapability("tb:options", tbOptions);
caps.setCapability("browserName", "chrome");
driver = await new webdriver.Builder().withCapabilities({
"browserName": 'chrome',
"platformName": 'Windows 10',
/** Google requires "w3c" to be set in "goog:chromeOptions" as true if you're using ChromeDriver version 74 or lower.
* Based on this commit: https://chromium.googlesource.com/chromium/src/+/2b49880e2481658e0702fd6fe494859bca52b39c
* ChromeDriver now uses w3c by default from version 75+ so setting this option will no longer be a requirement **/
"goog:chromeOptions" : { "w3c" : true },
"tb:options": {
"key": "api_key",
"secret": "api_secret",
"name": "My Test Name"
}
}).usingServer("https://hub.testingbot.com/wd/hub").build();
var chromeOptions = new ChromeOptions()
{
BrowserVersion = "81",
PlatformName = "Windows 10",
UseSpecCompliantProtocol = true
};
var tbOptions = new Dictionary<string, object>
{
["key"] = "api_key",
["secret"] = "api_secret",
["name"] = "My Test Name"
};
chromeOptions.AddAdditionalCapability("tb:options", tbOptions, true);
driver = new RemoteWebDriver(new Uri("https://hub.testingbot.com/wd/hub"),
chromeOptions.ToCapabilities(), TimeSpan.FromSeconds(600));
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.
ChromeOptions chromeOpts = new ChromeOptions();
chromeOpts.setExperimentalOption("w3c", true);
MutableCapabilities tbOptions = new MutableCapabilities();
tbOptions.setCapability("key", "api_key");
tbOptions.setCapability("secret", "api_secret");
tbOptions.setCapability("build", "My First Build");
DesiredCapabilities caps = new DesiredCapabilities();
caps.setCapability(ChromeOptions.CAPABILITY, chromeOpts);
caps.setCapability("platformName", "Windows 10");
caps.setCapability("tb:options", tbOptions);
caps.setCapability("browserName", "chrome");
driver = await new webdriver.Builder().withCapabilities({
"browserName": 'chrome',
"platformName": 'Windows 10',
/** Google requires "w3c" to be set in "goog:chromeOptions" as true if you're using ChromeDriver version 74 or lower.
* Based on this commit: https://chromium.googlesource.com/chromium/src/+/2b49880e2481658e0702fd6fe494859bca52b39c
* ChromeDriver now uses w3c by default from version 75+ so setting this option will no longer be a requirement **/
"goog:chromeOptions" : { "w3c" : true },
"tb:options": {
"key": "api_key",
"secret": "api_secret",
"build": "My First Build"
}
}).usingServer("https://hub.testingbot.com/wd/hub").build();
var chromeOptions = new ChromeOptions()
{
BrowserVersion = "81",
PlatformName = "Windows 10",
UseSpecCompliantProtocol = true
};
var tbOptions = new Dictionary<string, object>
{
["key"] = "api_key",
["secret"] = "api_secret",
["build"] = "My First Build"
};
chromeOptions.AddAdditionalCapability("tb:options", tbOptions, true);
driver = new RemoteWebDriver(new Uri("https://hub.testingbot.com/wd/hub"),
chromeOptions.ToCapabilities(), TimeSpan.FromSeconds(600));
Value Type |
---|
string |
Idle Timeout
The maximum amount of time a browser will wait before proceeding to the next step in your test.
ChromeOptions chromeOpts = new ChromeOptions();
chromeOpts.setExperimentalOption("w3c", true);
MutableCapabilities tbOptions = new MutableCapabilities();
tbOptions.setCapability("key", "api_key");
tbOptions.setCapability("secret", "api_secret");
tbOptions.setCapability("idletimeout", 130);
DesiredCapabilities caps = new DesiredCapabilities();
caps.setCapability(ChromeOptions.CAPABILITY, chromeOpts);
caps.setCapability("platformName", "Windows 10");
caps.setCapability("tb:options", tbOptions);
caps.setCapability("browserName", "chrome");
driver = await new webdriver.Builder().withCapabilities({
"browserName": 'chrome',
"platformName": 'Windows 10',
/** Google requires "w3c" to be set in "goog:chromeOptions" as true if you're using ChromeDriver version 74 or lower.
* Based on this commit: https://chromium.googlesource.com/chromium/src/+/2b49880e2481658e0702fd6fe494859bca52b39c
* ChromeDriver now uses w3c by default from version 75+ so setting this option will no longer be a requirement **/
"goog:chromeOptions" : { "w3c" : true },
"tb:options": {
"key": "api_key",
"secret": "api_secret",
"idletimeout": 130
}
}).usingServer("https://hub.testingbot.com/wd/hub").build();
var chromeOptions = new ChromeOptions()
{
BrowserVersion = "81",
PlatformName = "Windows 10",
UseSpecCompliantProtocol = true
};
var tbOptions = new Dictionary<string, object>
{
["key"] = "api_key",
["secret"] = "api_secret",
["idletimeout"] = 130
};
chromeOptions.AddAdditionalCapability("tb:options", tbOptions, true);
driver = new RemoteWebDriver(new Uri("https://hub.testingbot.com/wd/hub"),
chromeOptions.ToCapabilities(), TimeSpan.FromSeconds(600));
Value Type | Default Value |
---|---|
int (specify number of seconds) | 130 seconds |
Maximum Test Duration
The maximum duration for a single test. This is a safeguard to prevent bad tests from using up your credits.
We generally recommend to keep tests short (less than 10 minutes). It's better to split up large tests in smaller individual tests.
This keeps your tests fast and allows for more parallelization of your tests.
ChromeOptions chromeOpts = new ChromeOptions();
chromeOpts.setExperimentalOption("w3c", true);
MutableCapabilities tbOptions = new MutableCapabilities();
tbOptions.setCapability("key", "api_key");
tbOptions.setCapability("secret", "api_secret");
tbOptions.setCapability("maxduration", 1800);
DesiredCapabilities caps = new DesiredCapabilities();
caps.setCapability(ChromeOptions.CAPABILITY, chromeOpts);
caps.setCapability("platformName", "Windows 10");
caps.setCapability("tb:options", tbOptions);
caps.setCapability("browserName", "chrome");
driver = await new webdriver.Builder().withCapabilities({
"browserName": 'chrome',
"platformName": 'Windows 10',
/** Google requires "w3c" to be set in "goog:chromeOptions" as true if you're using ChromeDriver version 74 or lower.
* Based on this commit: https://chromium.googlesource.com/chromium/src/+/2b49880e2481658e0702fd6fe494859bca52b39c
* ChromeDriver now uses w3c by default from version 75+ so setting this option will no longer be a requirement **/
"goog:chromeOptions" : { "w3c" : true },
"tb:options": {
"key": "api_key",
"secret": "api_secret",
"maxduration": 1800
}
}).usingServer("https://hub.testingbot.com/wd/hub").build();
var chromeOptions = new ChromeOptions()
{
BrowserVersion = "81",
PlatformName = "Windows 10",
UseSpecCompliantProtocol = true
};
var tbOptions = new Dictionary<string, object>
{
["key"] = "api_key",
["secret"] = "api_secret",
["maxduration"] = 1800
};
chromeOptions.AddAdditionalCapability("tb:options", tbOptions, true);
driver = new RemoteWebDriver(new Uri("https://hub.testingbot.com/wd/hub"),
chromeOptions.ToCapabilities(), TimeSpan.FromSeconds(600));
Value Type | Default Value |
---|---|
int (specify number of seconds) | 1800 seconds (30 minutes) |
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.
ChromeOptions chromeOpts = new ChromeOptions();
chromeOpts.setExperimentalOption("w3c", true);
MutableCapabilities tbOptions = new MutableCapabilities();
tbOptions.setCapability("key", "api_key");
tbOptions.setCapability("secret", "api_secret");
tbOptions.setCapability("extra", "Extra Information");
DesiredCapabilities caps = new DesiredCapabilities();
caps.setCapability(ChromeOptions.CAPABILITY, chromeOpts);
caps.setCapability("platformName", "Windows 10");
caps.setCapability("tb:options", tbOptions);
caps.setCapability("browserName", "chrome");
driver = await new webdriver.Builder().withCapabilities({
"browserName": 'chrome',
"platformName": 'Windows 10',
/** Google requires "w3c" to be set in "goog:chromeOptions" as true if you're using ChromeDriver version 74 or lower.
* Based on this commit: https://chromium.googlesource.com/chromium/src/+/2b49880e2481658e0702fd6fe494859bca52b39c
* ChromeDriver now uses w3c by default from version 75+ so setting this option will no longer be a requirement **/
"goog:chromeOptions" : { "w3c" : true },
"tb:options": {
"key": "api_key",
"secret": "api_secret",
"extra": "Extra Information"
}
}).usingServer("https://hub.testingbot.com/wd/hub").build();
var chromeOptions = new ChromeOptions()
{
BrowserVersion = "81",
PlatformName = "Windows 10",
UseSpecCompliantProtocol = true
};
var tbOptions = new Dictionary<string, object>
{
["key"] = "api_key",
["secret"] = "api_secret",
["extra"] = "Extra Information"
};
chromeOptions.AddAdditionalCapability("tb:options", tbOptions, true);
driver = new RemoteWebDriver(new Uri("https://hub.testingbot.com/wd/hub"),
chromeOptions.ToCapabilities(), TimeSpan.FromSeconds(600));
Value Type |
---|
string |
Load custom browser extensions
If you specify this desired capability with the URL to your Chrome extension's .crx
file or Firefox addon's .xpi
file, we will download the extension, which will be added to Chrome or Firefox before your test starts.
ChromeOptions chromeOpts = new ChromeOptions();
chromeOpts.setExperimentalOption("w3c", true);
MutableCapabilities tbOptions = new MutableCapabilities();
tbOptions.setCapability("key", "api_key");
tbOptions.setCapability("secret", "api_secret");
tbOptions.setCapability("load-extension", "https://...");
DesiredCapabilities caps = new DesiredCapabilities();
caps.setCapability(ChromeOptions.CAPABILITY, chromeOpts);
caps.setCapability("platformName", "Windows 10");
caps.setCapability("tb:options", tbOptions);
caps.setCapability("browserName", "chrome");
driver = await new webdriver.Builder().withCapabilities({
"browserName": 'chrome',
"platformName": 'Windows 10',
/** Google requires "w3c" to be set in "goog:chromeOptions" as true if you're using ChromeDriver version 74 or lower.
* Based on this commit: https://chromium.googlesource.com/chromium/src/+/2b49880e2481658e0702fd6fe494859bca52b39c
* ChromeDriver now uses w3c by default from version 75+ so setting this option will no longer be a requirement **/
"goog:chromeOptions" : { "w3c" : true },
"tb:options": {
"key": "api_key",
"secret": "api_secret",
"load-extension": "https://..."
}
}).usingServer("https://hub.testingbot.com/wd/hub").build();
var chromeOptions = new ChromeOptions()
{
BrowserVersion = "81",
PlatformName = "Windows 10",
UseSpecCompliantProtocol = true
};
var tbOptions = new Dictionary<string, object>
{
["key"] = "api_key",
["secret"] = "api_secret",
["load-extension"] = "https://..."
};
chromeOptions.AddAdditionalCapability("tb:options", tbOptions, true);
driver = new RemoteWebDriver(new Uri("https://hub.testingbot.com/wd/hub"),
chromeOptions.ToCapabilities(), TimeSpan.FromSeconds(600));
Browser | Supported Format | Example |
---|---|---|
Chrome |
.zip file, containing the extension source code (manifest.json , src/ directory , ...) |
https://.../extension.zip |
Firefox (Firefox-Unbranded) |
.zip file, containing the extension source code (manifest.json , src/ directory , lib/ directory , ...) |
https://.../extension.zip |
Edge |
.zip file, containing the extension source code (manifest.json , src/ directory , ...) |
https://.../extension.zip |
Safari (and Safari Technology Preview) |
.safariextz file |
https://.../extension.safariextz |
With TestingBot Storage, you can upload your executable on our servers.
The advantage of this is that our test VMs can immediately download your executable from our own network, which is much faster than downloading from the public internet.
Once the file is uploaded via TestingBot Storage, you can use"prerun" : "tb://..."
Grouping
Specify in which groups you want to see the test results. You can group results to have an easy overview of tests across projects.
ChromeOptions chromeOpts = new ChromeOptions();
chromeOpts.setExperimentalOption("w3c", true);
MutableCapabilities tbOptions = new MutableCapabilities();
tbOptions.setCapability("key", "api_key");
tbOptions.setCapability("secret", "api_secret");
tbOptions.setCapability("groups", "group1,group2");
DesiredCapabilities caps = new DesiredCapabilities();
caps.setCapability(ChromeOptions.CAPABILITY, chromeOpts);
caps.setCapability("platformName", "Windows 10");
caps.setCapability("tb:options", tbOptions);
caps.setCapability("browserName", "chrome");
driver = await new webdriver.Builder().withCapabilities({
"browserName": 'chrome',
"platformName": 'Windows 10',
/** Google requires "w3c" to be set in "goog:chromeOptions" as true if you're using ChromeDriver version 74 or lower.
* Based on this commit: https://chromium.googlesource.com/chromium/src/+/2b49880e2481658e0702fd6fe494859bca52b39c
* ChromeDriver now uses w3c by default from version 75+ so setting this option will no longer be a requirement **/
"goog:chromeOptions" : { "w3c" : true },
"tb:options": {
"key": "api_key",
"secret": "api_secret",
"groups": "group1,group2"
}
}).usingServer("https://hub.testingbot.com/wd/hub").build();
var chromeOptions = new ChromeOptions()
{
BrowserVersion = "81",
PlatformName = "Windows 10",
UseSpecCompliantProtocol = true
};
var tbOptions = new Dictionary<string, object>
{
["key"] = "api_key",
["secret"] = "api_secret",
["groups"] = "group1,group2"
};
chromeOptions.AddAdditionalCapability("tb:options", tbOptions, true);
driver = new RemoteWebDriver(new Uri("https://hub.testingbot.com/wd/hub"),
chromeOptions.ToCapabilities(), TimeSpan.FromSeconds(600));
Value Type |
---|
string (comma-separated) |
AutoClicker
Specify one or more of the possible options below to have TestingBot automatically click certain dialogs which are unable to be automated via Selenium WebDriver.
ChromeOptions chromeOpts = new ChromeOptions();
chromeOpts.setExperimentalOption("w3c", true);
MutableCapabilities tbOptions = new MutableCapabilities();
tbOptions.setCapability("key", "api_key");
tbOptions.setCapability("secret", "api_secret");
tbOptions.setCapability("autoclick", []);
DesiredCapabilities caps = new DesiredCapabilities();
caps.setCapability(ChromeOptions.CAPABILITY, chromeOpts);
caps.setCapability("platformName", "Windows 10");
caps.setCapability("tb:options", tbOptions);
caps.setCapability("browserName", "chrome");
driver = await new webdriver.Builder().withCapabilities({
"browserName": 'chrome',
"platformName": 'Windows 10',
/** Google requires "w3c" to be set in "goog:chromeOptions" as true if you're using ChromeDriver version 74 or lower.
* Based on this commit: https://chromium.googlesource.com/chromium/src/+/2b49880e2481658e0702fd6fe494859bca52b39c
* ChromeDriver now uses w3c by default from version 75+ so setting this option will no longer be a requirement **/
"goog:chromeOptions" : { "w3c" : true },
"tb:options": {
"key": "api_key",
"secret": "api_secret",
"autoclick": []
}
}).usingServer("https://hub.testingbot.com/wd/hub").build();
var chromeOptions = new ChromeOptions()
{
BrowserVersion = "81",
PlatformName = "Windows 10",
UseSpecCompliantProtocol = true
};
var tbOptions = new Dictionary<string, object>
{
["key"] = "api_key",
["secret"] = "api_secret",
["autoclick"] = []
};
chromeOptions.AddAdditionalCapability("tb:options", tbOptions, true);
driver = new RemoteWebDriver(new Uri("https://hub.testingbot.com/wd/hub"),
chromeOptions.ToCapabilities(), TimeSpan.FromSeconds(600));
Value Type | Possible Values: |
---|---|
array of options |
chrome_extension_add , chrome_extension_permissions_allow
|
Sikuli
Specify an URL to a zip-file containing one or more .sikulu
projects. These will automatically start before your test runs, so that you can do certain automated tasks which Selenium cannot do (clicking native dialogs, ...)
Find more information regarding Sikuli Cloud Testing.
ChromeOptions chromeOpts = new ChromeOptions();
chromeOpts.setExperimentalOption("w3c", true);
MutableCapabilities tbOptions = new MutableCapabilities();
tbOptions.setCapability("key", "api_key");
tbOptions.setCapability("secret", "api_secret");
tbOptions.setCapability("sikuli", []);
DesiredCapabilities caps = new DesiredCapabilities();
caps.setCapability(ChromeOptions.CAPABILITY, chromeOpts);
caps.setCapability("platformName", "Windows 10");
caps.setCapability("tb:options", tbOptions);
caps.setCapability("browserName", "chrome");
driver = await new webdriver.Builder().withCapabilities({
"browserName": 'chrome',
"platformName": 'Windows 10',
/** Google requires "w3c" to be set in "goog:chromeOptions" as true if you're using ChromeDriver version 74 or lower.
* Based on this commit: https://chromium.googlesource.com/chromium/src/+/2b49880e2481658e0702fd6fe494859bca52b39c
* ChromeDriver now uses w3c by default from version 75+ so setting this option will no longer be a requirement **/
"goog:chromeOptions" : { "w3c" : true },
"tb:options": {
"key": "api_key",
"secret": "api_secret",
"sikuli": []
}
}).usingServer("https://hub.testingbot.com/wd/hub").build();
var chromeOptions = new ChromeOptions()
{
BrowserVersion = "81",
PlatformName = "Windows 10",
UseSpecCompliantProtocol = true
};
var tbOptions = new Dictionary<string, object>
{
["key"] = "api_key",
["secret"] = "api_secret",
["sikuli"] = []
};
chromeOptions.AddAdditionalCapability("tb:options", tbOptions, true);
driver = new RemoteWebDriver(new Uri("https://hub.testingbot.com/wd/hub"),
chromeOptions.ToCapabilities(), TimeSpan.FromSeconds(600));
Value Type |
---|
string (URL to zipped Sikuli project) |