Features

Mobile App Options

Please see the examples below on how to customize your test run on our mobile emulators and devices.

Appium Options

Appium provides a lot of options to configure your test.

Some important options that might help:

For Android:
  • appActivity and appPackage: by default, Appium will try to extract the main Activity from your apk. If this fails, you can supply your own with these options.
  • chromeOptions: additional chromedriver options you can supply.
  • otherApps: a JSON array of other apps that need to be installed, in URL format.
For Android & iOS:
  • locale: the language of the simulator/device (ex: fr_CA)
  • newCommandTimeout: How long (in seconds) Appium will wait for a new command from the client before assuming the client quit and ending the session

Specifying Appium Version

TestingBot will use the most recent, compatible, Appium version according to the device, OS and version you specify.

If you'd like to specify your own Appium version, you can do this with the appiumVersion capability.

Copy code
caps = Selenium::WebDriver::Remote::Capabilities.new
caps["appiumVersion"] = "2.0"
Copy code
DesiredCapabilities caps = new DesiredCapabilities();
caps.setCapability("appiumVersion", "2.53.1");
Copy code
$caps = array(
  "appiumVersion" => "2.0"
);
Copy code
capabilities = {
  "appiumVersion" : "2.0"
}
Copy code
const capabilities = {
  "appiumVersion" : "2.0"
}
Copy code
DesiredCapabilities caps = new DesiredCapabilities();
caps.SetCapability("appiumVersion", "2.0");
Selenium W3C Example:
Copy code
caps = {
  platformName: "iOS",
  deviceName: "iPhone 13",
  browserVersion: "16.0",
  app: 'https://testingbot.com/appium/sample.ipa',
  "tb:options" => {
    "appiumVersion" : "2.0"
  }
}
Copy code
ChromeOptions chromeOpts = new ChromeOptions();
chromeOpts.setExperimentalOption("w3c", true);

MutableCapabilities tbOptions = new MutableCapabilities();
tbOptions.setCapability("key", "api_key");
tbOptions.setCapability("secret", "api_secret");
tbOptions.setCapability("appiumVersion", "2.0");

DesiredCapabilities caps = new DesiredCapabilities();
caps.setCapability(ChromeOptions.CAPABILITY, chromeOpts);
caps.setCapability("platformName", "iOS");
caps.setCapability("tb:options", tbOptions);
caps.setCapability("deviceName", "iPhone 13");
caps.setCapability("browserVersion", "16.0");
caps.setCapability("app", "https://testingbot.com/appium/sample.ipa");
Copy code
$options = new ChromeOptions();
$capabilities = DesiredCapabilities::safari();
$capabilities->setPlatform('iOS');
$capabilities->setCapability('tb:options', array(
	'appiumVersion' => "2.0"
));
$capabilities->setCapability(ChromeOptions::CAPABILITY, $options);
Copy code
tbOptions = {
	'name': 'W3C Sample',
	'appiumVersion': "2.0"
}

chromeOpts =  {
    'app': "https://testingbot.com/appium/sample.ipa",
    'platformName': "iOS",
    'browserVersion': "16.0",
    'deviceName': "iPhone 13",
    'goog:chromeOptions': {'w3c': True},
    'tb:options': tbOptions
}

self.driver = webdriver.Remote(remote_url, desired_capabilities=chromeOpts)
Copy code
driver = await new webdriver.Builder().withCapabilities({
    "app": 'https://testingbot.com/appium/sample.ipa',
    "platformName": 'iOS',
    "deviceName": 'iPhone 13',
    "version": '16.0',

    /** 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",
        "appiumVersion": "2.0"
    }
}).usingServer("https://hub.testingbot.com/wd/hub").build();
Copy code
var chromeOptions = new ChromeOptions()
{
    BrowserVersion = "16.0",
    PlatformName = "iOS",
    DeviceName = "iPhone 13",
    App = "https://testingbot.com/appium/sample.ipa",
    UseSpecCompliantProtocol = true
};
var tbOptions = new Dictionary<string, object>
{
    ["key"] = "api_key",
    ["secret"] = "api_secret",
    ["appiumVersion"] = "2.0"
};

chromeOptions.AddAdditionalCapability("tb:options", tbOptions, true);

driver = new RemoteWebDriver(new Uri("https://hub.testingbot.com/wd/hub"),
    chromeOptions.ToCapabilities(), TimeSpan.FromSeconds(600));

Appium 2 Versions

We currently support these Appium 2 versions:

  • 2.11.3
  • 2.10.3
  • 2.9.0
  • 2.5.1
  • 2.4.1
  • 2.3.0
  • 2.2.1

If you specify "appiumVersion": "latest", TestingBot will automatically use the latest Appium version. You can also use latest-1, latest-2, ... to test on the next most recent versions of Appium.

Change Device Timezone

TestingBot allows you to change the timezone of the mobile device (physical or emu/sim) to a timezone that you specify. Simply pass in a timeZone capability specifying a timezone from the list. You can find a list of timezones on Wikipedia.

Copy code
caps = Selenium::WebDriver::Remote::Capabilities.new
caps["timeZone"] = "Etc/UTC"
Copy code
DesiredCapabilities caps = new DesiredCapabilities();
caps.setCapability("timeZone", "Etc/UTC");
Copy code
$caps = array(
  "timeZone" => "Etc/UTC"
);
Copy code
capabilities = {
  "timeZone" : "Etc/UTC"
}
Copy code
const capabilities = {
  "timeZone" : "Etc/UTC"
}
Copy code
DesiredCapabilities caps = new DesiredCapabilities();
caps.SetCapability("timeZone", "Etc/UTC");
Selenium W3C Example:
Copy code
caps = {
  platformName: "Android",
  app: "https://testingbot.com/appium/sample.apk",
  version: "13.0",
  deviceName: 'Galaxy S23',
  "tb:options" => {
    "timeZone" : "Etc/UTC"
  }
}
Copy code
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", "Android");
caps.setCapability("tb:options", tbOptions);
caps.setCapability("app", "https://testingbot.com/appium/sample.apk");
Copy code
$options = new ChromeOptions();
$capabilities = DesiredCapabilities::chrome();
$capabilities->setPlatform('Windows 10');
$capabilities->setCapability('tb:options', array(
	'timeZone' => "Etc/UTC"
));
$capabilities->setCapability(ChromeOptions::CAPABILITY, $options);
Copy code
tbOptions = {
	'timeZone': "Etc/UTC"
}

chromeOpts =  {
    'app': "https://testingbot.com/appium/sample.apk",
    'platformName': "Android",
    'goog:chromeOptions': {'w3c': True},
    'tb:options': tbOptions
}

self.driver = webdriver.Remote(remote_url, desired_capabilities=chromeOpts)
Copy code
driver = await new webdriver.Builder().withCapabilities({
    "app": 'https://testingbot.com/appium/sample.apk',
    "platformName": 'Android',
    "goog:chromeOptions" : { "w3c" : true },
    "tb:options": {
        "key": "api_key",
        "secret": "api_secret",
        "timeZone": "Etc/UTC"
    }
}).usingServer("https://hub.testingbot.com/wd/hub").build();
Copy code
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

Geolocation Testing

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

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

Copy code
caps = Selenium::WebDriver::Remote::Capabilities.new
caps["testingbot.geoCountryCode"] = "DE"
Copy code
DesiredCapabilities caps = new DesiredCapabilities();
caps.setCapability("testingbot.geoCountryCode", "DE");
Copy code
$caps = array(
  "testingbot.geoCountryCode" => "DE"
);
Copy code
capabilities = {
  "testingbot.geoCountryCode" : "DE"
}
Copy code
const capabilities = {
  "testingbot.geoCountryCode" : "DE"
}
Copy code
DesiredCapabilities caps = new DesiredCapabilities();
caps.SetCapability("testingbot.geoCountryCode", "DE");
Selenium W3C Example:
Copy code
caps = {
  platformName: "Android",
  app: "https://testingbot.com/appium/sample.apk",
  deviceName: "Galaxy S23",
  version: "13.0",
  "tb:options" => {
    "testingbot.geoCountryCode" : "DE"
  }
}
Copy code
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", "Android");
caps.setCapability("tb:options", tbOptions);
caps.setCapability("app", "https://testingbot.com/appium/sample.apk");
Copy code
$options = new ChromeOptions();
$capabilities = DesiredCapabilities::chrome();
$capabilities->setPlatform('Android');
$capabilities->setCapability('tb:options', array(
	'testingbot.geoCountryCode' => "DE"
));
$capabilities->setCapability(ChromeOptions::CAPABILITY, $options);
Copy code
tbOptions = {
	'testingbot.geoCountryCode': "DE"
}

chromeOpts =  {
    'app': "https://testingbot.com/appium/sample.apk",
    'platformName': "Android",
    'goog:chromeOptions': {'w3c': True},
    'tb:options': tbOptions
}

self.driver = webdriver.Remote(remote_url, desired_capabilities=chromeOpts)
Copy code
driver = await new webdriver.Builder().withCapabilities({
    "app": 'https://testingbot.com/appium/sample.apk',
    "platformName": 'Android',
    "goog:chromeOptions" : { "w3c" : true },
    "tb:options": {
        "key": "api_key",
        "secret": "api_secret",
        "testingbot.geoCountryCode": "DE"
    }
}).usingServer("https://hub.testingbot.com/wd/hub").build();
Copy code
var chromeOptions = new ChromeOptions()
{
    Version = "13.0",
    PlatformName = "Android",
    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

Upload files to device

You can upload files to the remote iOS or Android device, prior to starting a test. More information is available on this page: upload files to device.

Throttle Network

TestingBot provides a throttle network feature, which will simulate specific network conditions during a test.

We offer various presets:

  • Edge:
    • 250kbps download
    • 150kbps upload
    • 0% Loss
    • 300ms Latency
  • 3G:
    • 400kbps download
    • 100kbps upload
    • 0% Loss
    • 100ms Latency
  • 4G:
    • 18000kbps download
    • 9000kbps upload
    • 0% Loss
    • 100ms Latency
  • airplane:

    Simulates Airplane Mode (no network connectivity)

  • disable:

    Revert the throttling to no throttling.

We also offer the possibility to specify your own download, upload, loss and latency values.

You can pass a preset or specific options at the start of your test (through the capabilities), or during the test (with execute_script).

At the start of a test:
Copy code
caps = {
  throttle_network: "3G",
  throttle_network: {
    uploadSpeed: 10 * 1024,
    downloadSpeed: 10 * 1024,
    latency: 0,
    loss: 0
  }
}
Copy code
ChromeOptions chromeOpts = new ChromeOptions();
chromeOpts.setExperimentalOption("w3c", true);

MutableCapabilities tbOptions = new MutableCapabilities();
tbOptions.setCapability("key", "api_key");
tbOptions.setCapability("secret", "api_secret");
tbOptions.setCapability("throttle_network", "3G");

MutableCapabilities throttleOptions = new MutableCapabilities();
throttleOptions.setCapability("uploadSpeed", 10 * 1024);
throttleOptions.setCapability("downloadSpeed", 10 * 1024);
throttleOptions.setCapability("latency", 0);
throttleOptions.setCapability("loss", 0);
tbOptions.setCapability("throttle_network", throttleOptions);

DesiredCapabilities caps = new DesiredCapabilities();
caps.setCapability(ChromeOptions.CAPABILITY, chromeOpts);
caps.setCapability("tb:options", tbOptions);
caps.setCapability("browserName", "chrome");
Copy code
$options = new ChromeOptions();
$capabilities = DesiredCapabilities::chrome();
$capabilities->setPlatform('Windows 10');
$capabilities->setCapability('tb:options', array(
	'selenium-version' => '2.53.1',
	'throttle_network' => '3G',
	'throttle_network' => array(
		'uploadSpeed' => 10 * 1024,
		'downloadSpeed' => 10 * 1024,
		'latency' => 0,
		'loss' => 0
	)
));
$capabilities->setCapability(ChromeOptions::CAPABILITY, $options);
Copy code
tbOptions = {
	'name': 'W3C Sample',
	'throttle_network': '3G',
	'throttle_network': {
		'uploadSpeed': 10 * 1024,
		'downloadSpeed': 10 * 1024,
		'latency': 0,
		'loss': 0
    }
}

chromeOpts =  {
    'browserName': "chrome",
    'goog:chromeOptions': {'w3c': True},
    'tb:options': tbOptions
}

self.driver = webdriver.Remote(remote_url, desired_capabilities=chromeOpts)
Copy code
driver = await new webdriver.Builder().withCapabilities({
    "app": 'https://testingbot.com/appium/sample.apk',
    "goog:chromeOptions" : { "w3c" : true },
    "tb:options": {
        "key": "api_key",
        "secret": "api_secret",
        "throttle_network": "3G",
        "throttle_network": {
          "uploadSpeed": 10 * 1024,
          "downloadSpeed": 10 * 1024,
          "latency": 0,
          "loss": 0
    	}
    }
}).usingServer("https://hub.testingbot.com/wd/hub").build();
Copy code
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,
    ["throttle_network"] = "3G"
};

chromeOptions.AddAdditionalCapability("tb:options", tbOptions, true);

driver = new RemoteWebDriver(new Uri("https://hub.testingbot.com/wd/hub"),
    chromeOptions.ToCapabilities(), TimeSpan.FromSeconds(600));
During a test:
Copy code
driver.execute_script("tb:throttle", "3G")
# or
driver.execute_script("tb:throttle", {
    "downloadSpeed": 10 * 1024,
    "uploadSpeed": 10 * 1024,
    "latency": 0,
    "loss": 0
})
Copy code
((JavascriptExecutor) driver).executeScript("tb:throttle", "3G");
// or
Map<String, Object> throttleMap = new HashMap<>();
throttleMap.put("downloadSpeed", 10 * 1024);
throttleMap.put("uploadSpeed", 10 * 1024);
throttleMap.put("latency", 0);
throttleMap.put("loss", 0);
((JavascriptExecutor) driver).executeScript("tb:throttle", throttleMap);
Copy code
$driver->executeScript("tb:throttle", ["3G"]);
// or
$driver->executeScript("tb:throttle", [
	"downloadSpeed" => 10 * 1024,
	"uploadSpeed" => 10 * 1024,
	"latency" => 0,
	"loss" => 0
]);
Copy code
driver.execute_script("tb:throttle", "3G")
# or
driver.execute_script("tb:throttle", {
	"downloadSpeed" => 10 * 1024,
	"uploadSpeed" => 10 * 1024,
	"latency" => 0,
	"loss" => 0
})
Copy code
browser.execute('tb:throttle', '3G')
// or
browser.execute('tb:throttle', { 
    "downloadSpeed" => 10 * 1024,
	"uploadSpeed" => 10 * 1024,
	"latency" => 0,
	"loss" => 0
})
Copy code
((IJavaScriptExecutor)driver).ExecuteScript("tb:throttle", "3G");
# or
((IJavaScriptExecutor)driver).ExecuteScript("tb:throttle", "{\"downloadSpeed\":10*1024, \"uploadSpeed\": 10*1024, \"latency\": 0, \"loss\": 0}");

To stop network throttling during your test, pass disable: true in the tb:throttle options via the execute_script.

Device Name

When running a mobile automated test, you'll need to specify on which mobile device (or simulator/emulator) you want to test.

Copy code
caps = {
  deviceName: "Samsung S21"	
}
Copy code
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("deviceName", "Samsung S21");
Copy code
tbOptions = {
	'name': 'W3C Sample'
}

chromeOpts =  {
    'deviceName': "Samsung S21",
    'platformName': "Android",
    'goog:chromeOptions': {'w3c': True},
    'tb:options': tbOptions
}

self.driver = webdriver.Remote(remote_url, desired_capabilities=chromeOpts)
Copy code
driver = await new webdriver.Builder().withCapabilities({
    "browserName": 'chrome',
    "deviceName": 'Samsung S21',
    "platformName": 'Android',
    "goog:chromeOptions" : { "w3c" : true },
    "tb:options": {
        "key": "api_key",
        "secret": "api_secret"
    }
}).usingServer("https://hub.testingbot.com/wd/hub").build();
Copy code
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"] = "Samsung S21"
};

chromeOptions.AddAdditionalCapability("tb:options", tbOptions, true);

driver = new RemoteWebDriver(new Uri("https://hub.testingbot.com/wd/hub"),
    chromeOptions.ToCapabilities(), TimeSpan.FromSeconds(600));
Physical Devices Only

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:

Copy code
// find any iPhone, except 6 or 6s
capabilities.setCapability("deviceName", "^(iPhone.*)(?!6|6S)$");

// find any device which name starts with Samsung
capabilities.setCapability("deviceName", "Samsung.*");

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.

Copy code
caps = {
  version: "(16|17).*"	
}
Copy code
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).*");
Copy code
tbOptions = {
	'name': 'W3C Sample'
}

chromeOpts =  {
    'appium:deviceName': "*",
    'appium:version': '(13|14).*'
    'platformName': "Android",
    'goog:chromeOptions': {'w3c': True}
}

self.driver = webdriver.Remote(remote_url, desired_capabilities=chromeOpts)
Copy code
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();
Copy code
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:

Copy code
// target multiple specific versions of an iPhone device
capabilities.setCapability("appium:deviceName", "iPhone.*");
capabilities.setCapability("appium:version", "18.0|15.0|14.2|14");

// 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.

Copy code
caps = {
  deviceName: "*",
  tabletOnly: true
}
Copy code
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);
Copy code
tbOptions = {
	'name': 'W3C Sample'
}

chromeOpts =  {
    'deviceName': "*",
    'tabletOnly': true,
    'platformName': "Android",
    'goog:chromeOptions': {'w3c': True},
    'tb:options': tbOptions
}

self.driver = webdriver.Remote(remote_url, desired_capabilities=chromeOpts)
Copy code
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();
Copy code
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.

Copy code
caps = {
  deviceName: "*",
  phoneOnly: true
}
Copy code
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);
Copy code
tbOptions = {
	'name': 'W3C Sample'
}

chromeOpts =  {
    'deviceName': "*",
    'phoneOnly': true,
    'platformName': "Android",
    'goog:chromeOptions': {'w3c': True},
    'tb:options': tbOptions
}

self.driver = webdriver.Remote(remote_url, desired_capabilities=chromeOpts)
Copy code
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();
Copy code
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));

Change Test Name

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

Copy code
caps = Selenium::WebDriver::Remote::Capabilities.new
caps["name"] = "My Test Name"
Copy code
DesiredCapabilities caps = new DesiredCapabilities();
caps.setCapability("name", "My Test Name");
Copy code
$caps = array(
  "name" => "My Test Name"
);
Copy code
capabilities = {
  "name" : "My Test Name"
}
Copy code
const capabilities = {
  "name" : "My Test Name"
}
Copy code
DesiredCapabilities caps = new DesiredCapabilities();
caps.SetCapability("name", "My Test Name");
Selenium W3C Example:
Copy code
caps = {
  platformName: "Android",
  app: "https://testingbot.com/appium/sample.apk",
  version: "13.0",
  deviceName: "Galaxy S23",
  "tb:options" => {
    "name" : "My Test Name"
  }
}
Copy code
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", "Android");
caps.setCapability("tb:options", tbOptions);
caps.setCapability("app", "https://testingbot.com/appium/sample.apk");
Copy code
$options = new ChromeOptions();
$capabilities = DesiredCapabilities::chrome();
$capabilities->setPlatform('Android');
$capabilities->setCapability('tb:options', array(
	'name' => "My Test Name"
));
$capabilities->setCapability(ChromeOptions::CAPABILITY, $options);
Copy code
tbOptions = {
	'name': "My Test Name"
}

chromeOpts =  {
    'app': "https://testingbot.com/appium/sample.apk",
    'platformName': "Android",
    'deviceName': "Galaxy S23",
    'goog:chromeOptions': {'w3c': True},
    'tb:options': tbOptions
}

self.driver = webdriver.Remote(remote_url, desired_capabilities=chromeOpts)
Copy code
driver = await new webdriver.Builder().withCapabilities({
    "app": 'https://testingbot.com/appium/sample.apk',
    "platformName": 'Android',
    "goog:chromeOptions" : { "w3c" : true },
    "tb:options": {
        "key": "api_key",
        "secret": "api_secret",
        "name": "My Test Name"
    }
}).usingServer("https://hub.testingbot.com/wd/hub").build();
Copy code
var chromeOptions = new ChromeOptions()
{
    Version = "13.0",
    PlatformName = "Android",
    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.

Copy code
caps = Selenium::WebDriver::Remote::Capabilities.new
caps["build"] = "My First Build"
Copy code
DesiredCapabilities caps = new DesiredCapabilities();
caps.setCapability("build", "My First Build");
Copy code
$caps = array(
  "build" => "My First Build"
);
Copy code
capabilities = {
  "build" : "My First Build"
}
Copy code
const capabilities = {
  "build" : "My First Build"
}
Copy code
DesiredCapabilities caps = new DesiredCapabilities();
caps.SetCapability("build", "My First Build");
Selenium W3C Example:
Copy code
caps = {
  platformName: "Android",
  app: "https://testingbot.com/appium/sample.apk",
  version: "13.0",
  deviceName: "Galaxy S23",
  "tb:options" => {
    "build" : "My First Build"
  }
}
Copy code
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", "Android");
caps.setCapability("tb:options", tbOptions);
caps.setCapability("app", "https://testingbot.com/appium/sample.apk");
Copy code
$options = new ChromeOptions();
$capabilities = DesiredCapabilities::chrome();
$capabilities->setPlatform('Android');
$capabilities->setCapability('tb:options', array(
	'build' => "My First Build"
));
$capabilities->setCapability(ChromeOptions::CAPABILITY, $options);
Copy code
tbOptions = {
	'build': "My First Build"
}

chromeOpts =  {
    'app': "https://testingbot.com/appium/sample.apk",
    'platformName': "Android",
    'deviceName': "Galaxy S23",
    'version': '13.0',
    'goog:chromeOptions': {'w3c': True},
    'tb:options': tbOptions
}

self.driver = webdriver.Remote(remote_url, desired_capabilities=chromeOpts)
Copy code
driver = await new webdriver.Builder().withCapabilities({
    "app": 'https://testingbot.com/appium/sample.apk',
    "platformName": 'Android',
    "goog:chromeOptions" : { "w3c" : true },
    "tb:options": {
        "key": "api_key",
        "secret": "api_secret",
        "build": "My First Build"
    }
}).usingServer("https://hub.testingbot.com/wd/hub").build();
Copy code
var chromeOptions = new ChromeOptions()
{
    Version = "13.0",
    PlatformName = "Android",
    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 device will wait before proceeding to the next step in your test.

Copy code
caps = Selenium::WebDriver::Remote::Capabilities.new
caps["idletimeout"] = 130
Copy code
DesiredCapabilities caps = new DesiredCapabilities();
caps.setCapability("idletimeout", 130);
Copy code
$caps = array(
  "idletimeout" => 130
);
Copy code
capabilities = {
  "idletimeout" : 130
}
Copy code
const capabilities = {
  "idletimeout" : 130
}
Copy code
DesiredCapabilities caps = new DesiredCapabilities();
caps.SetCapability("idletimeout", 130);
Selenium W3C Example:
Copy code
caps = {
  platformName: "Android",
  app: "https://testingbot.com/appium/sample.apk",
  version: "13.0",
  deviceName: "Galaxy S23",
  "tb:options" => {
    "idletimeout" : 130
  }
}
Copy code
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", "Android");
caps.setCapability("tb:options", tbOptions);
caps.setCapability("app", "https://testingbot.com/appium/sample.apk");
Copy code
$options = new ChromeOptions();
$capabilities = DesiredCapabilities::chrome();
$capabilities->setPlatform('Android');
$capabilities->setCapability('tb:options', array(
	'idletimeout' => 130
));
$capabilities->setCapability(ChromeOptions::CAPABILITY, $options);
Copy code
tbOptions = {
	'idletimeout': 130
}

chromeOpts =  {
    'app': "https://testingbot.com/appium/sample.apk",
    'platformName': "Android",
    'goog:chromeOptions': {'w3c': True},
    'tb:options': tbOptions
}

self.driver = webdriver.Remote(remote_url, desired_capabilities=chromeOpts)
Copy code
driver = await new webdriver.Builder().withCapabilities({
    "app": 'https://testingbot.com/appium/sample.apk',
    "platformName": 'Android',
    "goog:chromeOptions" : { "w3c" : true },
    "tb:options": {
        "key": "api_key",
        "secret": "api_secret",
        "idletimeout": 130
    }
}).usingServer("https://hub.testingbot.com/wd/hub").build();
Copy code
var chromeOptions = new ChromeOptions()
{
    Version = "13.0",
    PlatformName = "Android",
    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.

Copy code
caps = Selenium::WebDriver::Remote::Capabilities.new
caps["maxduration"] = 1800
Copy code
DesiredCapabilities caps = new DesiredCapabilities();
caps.setCapability("maxduration", 1800);
Copy code
$caps = array(
  "maxduration" => 1800
);
Copy code
capabilities = {
  "maxduration" : 1800
}
Copy code
const capabilities = {
  "maxduration" : 1800
}
Copy code
DesiredCapabilities caps = new DesiredCapabilities();
caps.SetCapability("maxduration", 1800);
Selenium W3C Example:
Copy code
caps = {
  platformName: "Android",
  app: "https://testingbot.com/appium/sample.apk",
  version: "13.0",
  deviceName: "Galaxy S23",
  "tb:options" => {
    "maxduration" : 1800
  }
}
Copy code
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", "Android");
caps.setCapability("tb:options", tbOptions);
caps.setCapability("app", "https://testingbot.com/appium/sample.apk");
Copy code
$options = new ChromeOptions();
$capabilities = DesiredCapabilities::chrome();
$capabilities->setPlatform('Android');
$capabilities->setCapability('tb:options', array(
	'maxduration' => 1800
));
$capabilities->setCapability(ChromeOptions::CAPABILITY, $options);
Copy code
tbOptions = {
	'maxduration': 1800
}

chromeOpts =  {
    'app': "https://testingbot.com/appium/sample.apk",
    'platformName': "Android",
    'goog:chromeOptions': {'w3c': True},
    'tb:options': tbOptions
}

self.driver = webdriver.Remote(remote_url, desired_capabilities=chromeOpts)
Copy code
driver = await new webdriver.Builder().withCapabilities({
    "app": 'https://testingbot.com/appium/sample.apk',
    "platformName": 'Android',
    "goog:chromeOptions" : { "w3c" : true },
    "tb:options": {
        "key": "api_key",
        "secret": "api_secret",
        "maxduration": 1800
    }
}).usingServer("https://hub.testingbot.com/wd/hub").build();
Copy code
var chromeOptions = new ChromeOptions()
{
    Version = "13.0",
    PlatformName = "Android",
    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.

Copy code
caps = Selenium::WebDriver::Remote::Capabilities.new
caps["extra"] = "Extra Information"
Copy code
DesiredCapabilities caps = new DesiredCapabilities();
caps.setCapability("extra", "Extra Information");
Copy code
$caps = array(
  "extra" => "Extra Information"
);
Copy code
capabilities = {
  "extra" : "Extra Information"
}
Copy code
const capabilities = {
  "extra" : "Extra Information"
}
Copy code
DesiredCapabilities caps = new DesiredCapabilities();
caps.SetCapability("extra", "Extra Information");
Selenium W3C Example:
Copy code
caps = {
  platformName: "Android",
  app: "https://testingbot.com/appium/sample.apk",
  version: "13.0",
  deviceName: "Galaxy S23",
  "tb:options" => {
    "extra" : "Extra Information"
  }
}
Copy code
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", "Android");
caps.setCapability("tb:options", tbOptions);
caps.setCapability("browserName", "chrome");
Copy code
$options = new ChromeOptions();
$capabilities = DesiredCapabilities::chrome();
$capabilities->setPlatform('Android');
$capabilities->setCapability('tb:options', array(
	'extra' => "Extra Information"
));
$capabilities->setCapability(ChromeOptions::CAPABILITY, $options);
Copy code
tbOptions = {
	'extra': "Extra Information"
}

chromeOpts =  {
    'app': "https://testingbot.com/appium/sample.apk",
    'platformName': "Android",
    'goog:chromeOptions': {'w3c': True},
    'tb:options': tbOptions
}

self.driver = webdriver.Remote(remote_url, desired_capabilities=chromeOpts)
Copy code
driver = await new webdriver.Builder().withCapabilities({
    "app": 'https://testingbot.com/appium/sample.apk',
    "platformName": 'Android',
    "goog:chromeOptions" : { "w3c" : true },
    "tb:options": {
        "key": "api_key",
        "secret": "api_secret",
        "extra": "Extra Information"
    }
}).usingServer("https://hub.testingbot.com/wd/hub").build();
Copy code
var chromeOptions = new ChromeOptions()
{
    Version = "13.0",
    PlatformName = "Android",
    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

Taking screenshots during your tests

By default, TestingBot does not capture screenshots at every step of your mobile test. If you wish to take a screenshot for every step, please add this capability (set to true) to your request.

Copy code
caps = Selenium::WebDriver::Remote::Capabilities.new
caps["screenshot"] = true
Copy code
DesiredCapabilities caps = new DesiredCapabilities();
caps.setCapability("screenshot", true);
Copy code
$caps = array(
  "screenshot" => true
);
Copy code
capabilities = {
  "screenshot" : True
}
Copy code
const capabilities = {
  "screenshot" : true
}
Copy code
DesiredCapabilities caps = new DesiredCapabilities();
caps.SetCapability("screenshot", true);
Selenium W3C Example:
Copy code
caps = {
  platformName: "Android",
  app: "https://testingbot.com/appium/sample.apk",
  version: "13.0",
  deviceName: "Galaxy S23",
  "tb:options" => {
    screenshot: true
  }
}
Copy code
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", "Android");
caps.setCapability("tb:options", tbOptions);
caps.setCapability("app", "https://testingbot.com/appium/sample.apk);
Copy code
$options = new ChromeOptions();
$capabilities = DesiredCapabilities::chrome();
$capabilities->setPlatform('Android');
$capabilities->setCapability('tb:options', array(
	'screenshot' => true
));
$capabilities->setCapability(ChromeOptions::CAPABILITY, $options);
Copy code
tbOptions = {
	'name': 'W3C Sample',
	'screenshot': True
}

chromeOpts =  {
    'app': "https://testingbot.com/appium/sample.apk,
    'platformName': "Android",
    'goog:chromeOptions': {'w3c': True},
    'tb:options': tbOptions
}

self.driver = webdriver.Remote(remote_url, desired_capabilities=chromeOpts)
Copy code
driver = await new webdriver.Builder().withCapabilities({
    "app": 'https://testingbot.com/appium/sample.apk',
    "platformName": 'Android',
    "goog:chromeOptions" : { "w3c" : true },
    "tb:options": {
        "key": "api_key",
        "secret": "api_secret",
        "screenshot": true
    }
}).usingServer("https://hub.testingbot.com/wd/hub").build();
Copy code
var chromeOptions = new ChromeOptions()
{
    Version = "23",
    PlatformName = "Android",
    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.

Copy code
caps = Selenium::WebDriver::Remote::Capabilities.new
caps["screenrecorder"] = true
Copy code
DesiredCapabilities caps = new DesiredCapabilities();
caps.setCapability("screenrecorder", true);
Copy code
$caps = array(
  "screenrecorder" => true
);
Copy code
capabilities = {
  "screenrecorder" : True
}
Copy code
const capabilities = {
  "screenrecorder" : true
}
Copy code
DesiredCapabilities caps = new DesiredCapabilities();
caps.SetCapability("screenrecorder", true);
Selenium W3C Example:
Copy code
caps = {
  platformName: "Android",
  app: "https://testingbot.com/appium/sample.apk",
  version: "13.0",
  "tb:options" => {
    screenrecorder: true
  }
}
Copy code
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", "Android");
caps.setCapability("tb:options", tbOptions);
caps.setCapability("app", "https://testingbot.com/appium/sample.apk");
Copy code
$options = new ChromeOptions();
$capabilities = DesiredCapabilities::chrome();
$capabilities->setPlatform('Android');
$capabilities->setCapability('tb:options', array(
	'screenrecorder' => true
));
$capabilities->setCapability(ChromeOptions::CAPABILITY, $options);
Copy code
tbOptions = {
	'name': 'W3C Sample',
	'screenrecorder': True
}

chromeOpts =  {
    'app': "https://testingbot.com/appium/sample.apk",
    'platformName': "Android",
    'goog:chromeOptions': {'w3c': True},
    'tb:options': tbOptions
}

self.driver = webdriver.Remote(remote_url, desired_capabilities=chromeOpts)
Copy code
driver = await new webdriver.Builder().withCapabilities({
    "app": 'https://testingbot.com/appium/sample.apk',
    "platformName": 'Android',
    "goog:chromeOptions" : { "w3c" : true },
    "tb:options": {
        "key": "api_key",
        "secret": "api_secret",
        "screenrecorder": true
    }
}).usingServer("https://hub.testingbot.com/wd/hub").build();
Copy code
var chromeOptions = new ChromeOptions()
{
    Version = "13.0",
    PlatformName = "Android",
    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.

Copy code
caps = Selenium::WebDriver::Remote::Capabilities.new
caps["public"] = false
Copy code
DesiredCapabilities caps = new DesiredCapabilities();
caps.setCapability("public", false);
Copy code
$caps = array(
  "public" => false
);
Copy code
capabilities = {
  "public" : False
}
Copy code
const capabilities = {
  "public" : false
}
Copy code
DesiredCapabilities caps = new DesiredCapabilities();
caps.SetCapability("public", false);
Selenium W3C Example:
Copy code
caps = {
  platformName: "Android",
  app: "https://testingbot.com/appium/sample.apk",
  version: "13.0",
  "tb:options" => {
    "public" : false
  }
}
Copy code
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", "Android");
caps.setCapability("tb:options", tbOptions);
caps.setCapability("app", "https://testingbot.com/appium/sample.apk");
Copy code
$options = new ChromeOptions();
$capabilities = DesiredCapabilities::chrome();
$capabilities->setPlatform('Android');
$capabilities->setCapability('tb:options', array(
	'public' => 130
));
$capabilities->setCapability(ChromeOptions::CAPABILITY, $options);
Copy code
tbOptions = {
	'public': False
}

chromeOpts =  {
    'app': "https://testingbot.com/appium/sample.apk",
    'platformName': "Android",
    'goog:chromeOptions': {'w3c': True},
    'tb:options': tbOptions
}

self.driver = webdriver.Remote(remote_url, desired_capabilities=chromeOpts)
Copy code
driver = await new webdriver.Builder().withCapabilities({
    "app": 'https://testingbot.com/appium/sample.apk',
    "platformName": 'Android',
    "goog:chromeOptions" : { "w3c" : true },
    "tb:options": {
        "key": "api_key",
        "secret": "api_secret",
        "public": false
    }
}).usingServer("https://hub.testingbot.com/wd/hub").build();
Copy code
var chromeOptions = new ChromeOptions()
{
    Version = "13.0",
    PlatformName = "Android",
    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

Customize Logging

By default, TestingBot records logs of all test 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 Appium logs, Chromedriver logs, ...).

Copy code
caps = Selenium::WebDriver::Remote::Capabilities.new
caps["recordLogs"] = true
Copy code
DesiredCapabilities caps = new DesiredCapabilities();
caps.setCapability("recordLogs", true);
Copy code
$caps = array(
  "recordLogs" => true
);
Copy code
capabilities = {
  "recordLogs" : True
}
Copy code
const capabilities = {
  "recordLogs" : true
}
Copy code
DesiredCapabilities caps = new DesiredCapabilities();
caps.SetCapability("recordLogs", true);
Selenium W3C Example:
Copy code
caps = {
  platformName: "Android",
  app: "https://testingbot.com/appium/sample.apk",
  version: "13.0",
  deviceName: "Galaxy S23",
  "tb:options" => {
    "recordLogs" : true
  }
}
Copy code
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", "Android");
caps.setCapability("tb:options", tbOptions);
caps.setCapability("app", "https://testingbot.com/appium/sample.apk");
Copy code
$options = new ChromeOptions();
$capabilities = DesiredCapabilities::chrome();
$capabilities->setPlatform('Android');
$capabilities->setCapability('tb:options', array(
	'recordLogs' => true
));
$capabilities->setCapability(ChromeOptions::CAPABILITY, $options);
Copy code
tbOptions = {
	'recordLogs': True
}

chromeOpts =  {
    'app': "https://testingbot.com/appium/sample.apk",
    'platformName': "Android",
    'goog:chromeOptions': {'w3c': True},
    'tb:options': tbOptions
}

self.driver = webdriver.Remote(remote_url, desired_capabilities=chromeOpts)
Copy code
driver = await new webdriver.Builder().withCapabilities({
    "app": 'https://testingbot.com/appium/sample.apk',
    "platformName": 'Android',
    "goog:chromeOptions" : { "w3c" : true },
    "tb:options": {
        "key": "api_key",
        "secret": "api_secret",
        "recordLogs": true
    }
}).usingServer("https://hub.testingbot.com/wd/hub").build();
Copy code
var chromeOptions = new ChromeOptions()
{
    Version = "13.0",
    PlatformName = "Android",
    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