diff --git a/WebDriver/Driver.php b/WebDriver/Driver.php index 7dd4760..d6215b2 100644 --- a/WebDriver/Driver.php +++ b/WebDriver/Driver.php @@ -86,6 +86,17 @@ public static function InitAtBrowserStack($browserstack_username, $browserstack_ } return new WebDriver_Driver("http://" . $browserstack_username . ":" . $browserstack_value . "@hub.browserstack.com/wd/hub", $capabilities); } + + public static function InitAtTestingBot($testingbot_apikey, $testbot_secret, $os, $browser, $version = false, $additional_options = array()) { + $capabilities = array_merge(array( + 'platform' => strtoupper($os), + 'browserName' => $browser + ), $additional_options); + if ($version) { + $capabilities["version"] = $version; + } + return new WebDriver_Driver("http://" . $testingbot_apikey . ":" . $testbot_secret . "@hub.testingbot.com:4444/wd/hub", $capabilities); + } public static function InitAtHost($host, $port, $browser, $additional_options = array()) { $capabilities = array_merge(array(