Skip to content
This repository was archived by the owner on Mar 4, 2020. It is now read-only.

Commit f650ee7

Browse files
committed
Do not send w3c capability as a workaround for browsestack schema validation (fixes #644)
1 parent ec7ce5b commit f650ee7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/Remote/RemoteWebDriver.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,9 @@ public static function create(
105105

106106
// Hotfix: W3C WebDriver protocol is not yet supported by php-webdriver, so we must force Chromedriver to
107107
// not use the W3C protocol by default (which is what Chromedriver does starting with version 75).
108-
if ($desired_capabilities->getBrowserName() === WebDriverBrowserType::CHROME) {
108+
if ($desired_capabilities->getBrowserName() === WebDriverBrowserType::CHROME
109+
&& mb_strpos($selenium_server_url, 'browserstack') === false // see https://github.com/facebook/php-webdriver/issues/644
110+
) {
109111
$currentChromeOptions = $desired_capabilities->getCapability(ChromeOptions::CAPABILITY);
110112
$chromeOptions = !empty($currentChromeOptions) ? $currentChromeOptions : new ChromeOptions();
111113

0 commit comments

Comments
 (0)