Skip to content

Commit

Permalink
Shrinkwrapped support for BrowserStack (http://www.browserstack.com/)
Browse files Browse the repository at this point in the history
  • Loading branch information
chibimagic committed Mar 4, 2015
1 parent 9e16ecc commit 842fb0e
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions WebDriver/Driver.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,18 @@ public static function InitAtSauce($sauce_username, $sauce_key, $os, $browser, $
}
return new WebDriver_Driver("http://" . $sauce_username . ":" . $sauce_key . "@ondemand.saucelabs.com:80/wd/hub", $capabilities);
}

public static function InitAtBrowserStack($browserstack_username, $browserstack_value, $os, $browser, $version = false, $additional_options = array()) {
$capabilities = array_merge(array(
'browserstack.debug' => true,
'platform' => strtoupper($os),
'browserName' => $browser
), $additional_options);
if ($version) {
$capabilities["version"] = $version;
}
return new WebDriver_Driver("http://" . $browserstack_username . ":" . $browserstack_value . "@hub.browserstack.com/wd/hub", $capabilities);
}

public static function InitAtHost($host, $port, $browser, $additional_options = array()) {
$capabilities = array_merge(array(
Expand Down

0 comments on commit 842fb0e

Please sign in to comment.