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.

caps = Selenium::WebDriver::Remote::Capabilities.new
caps["appiumVersion"] = "2.0"
DesiredCapabilities caps = new DesiredCapabilities();
caps.setCapability("appiumVersion", "2.53.1");
$caps = array(
  "appiumVersion" => "2.0"
);
capabilities = {
  "appiumVersion" : "2.0"
}
const capabilities = {
  "appiumVersion" : "2.0"
}
DesiredCapabilities caps = new DesiredCapabilities();
caps.SetCapability("appiumVersion", "2.0");
Selenium W3C Example:
caps = {
  platformName: "iOS",
  deviceName: "iPhone 13",
  browserVersion: "16.0",
  app: 'https://testingbot.com/appium/sample.ipa',
  "tb:options" => {
    "appiumVersion" : "2.0"
  }
}
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");
$options = new ChromeOptions();
$capabilities = DesiredCapabilities::safari();
$capabilities->setPlatform('iOS');
$capabilities->setCapability('tb:options', array(
	'appiumVersion' => "2.0"
));
$capabilities->setCapability(ChromeOptions::CAPABILITY, $options);
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)
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();
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.4.1
  • 2.3.0
  • 2.2.1
  • 2.2.0
  • 2.1.0
  • 2.0.0

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.

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

caps = Selenium::WebDriver::Remote::Capabilities.new
caps["testingbot.geoCountryCode"] = "DE"
DesiredCapabilities caps = new DesiredCapabilities();
caps.setCapability("testingbot.geoCountryCode", "DE");
$caps = array(
  "testingbot.geoCountryCode" => "DE"
);
capabilities = {
  "testingbot.geoCountryCode" : "DE"
}
const capabilities = {
  "testingbot.geoCountryCode" : "DE"
}
DesiredCapabilities caps = new DesiredCapabilities();
caps.SetCapability("testingbot.geoCountryCode", "DE");
Selenium W3C Example:
caps = {
  platformName: "Android",
  app: "https://testingbot.com/appium/sample.apk",
  deviceName: "Galaxy S23",
  version: "13.0",
  "tb:options" => {
    "testingbot.geoCountryCode" : "DE"
  }
}
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");
$options = new ChromeOptions();
$capabilities = DesiredCapabilities::chrome();
$capabilities->setPlatform('Android');
$capabilities->setCapability('tb:options', array(
	'testingbot.geoCountryCode' => "DE"
));
$capabilities->setCapability(ChromeOptions::CAPABILITY, $options);
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)
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();
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
  • 'CO': Colombia
  • 'EG': Egypt
  • '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:
caps = {
  throttle_network: "3G",
  throttle_network: {
    uploadSpeed: 10 * 1024,
    downloadSpeed: 10 * 1024,
    latency: 0,
    loss: 0
  }
}
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");
$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);
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)
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();
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:
driver.execute_script("tb:throttle", "3G")
# or
driver.execute_script("tb:throttle", {
    "downloadSpeed": 10 * 1024,
    "uploadSpeed": 10 * 1024,
    "latency": 0,
    "loss": 0
})
((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);
$driver->executeScript("tb:throttle", ["3G"]);
// or
$driver->executeScript("tb:throttle", [
	"downloadSpeed" => 10 * 1024,
	"uploadSpeed" => 10 * 1024,
	"latency" => 0,
	"loss" => 0
]);
driver.execute_script("tb:throttle", "3G")
# or
driver.execute_script("tb:throttle", {
	"downloadSpeed" => 10 * 1024,
	"uploadSpeed" => 10 * 1024,
	"latency" => 0,
	"loss" => 0
})
browser.execute('tb:throttle', '3G')
// or
browser.execute('tb:throttle', { 
    "downloadSpeed" => 10 * 1024,
	"uploadSpeed" => 10 * 1024,
	"latency" => 0,
	"loss" => 0
})
((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.

caps = {
  deviceName: "Samsung S21"	
}
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");
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)
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();
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:

// 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.*");

Tablet Only

You can specify this capability when you only want to allocate a tablet device.

caps = {
  deviceName: "*",
  tabletOnly: true
}
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);
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)
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.

caps = {
  deviceName: "*",
  phoneOnly: true
}
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);
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)
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));

Change Test Name

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

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

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

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

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

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

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

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

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

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