Skip to content

Enable W3C protocol for Chrome 🎉#674

Merged
OndraM merged 3 commits into
php-webdriver:communityfrom
OndraM:feature/w3c-chromedriver
Nov 11, 2019
Merged

Enable W3C protocol for Chrome 🎉#674
OndraM merged 3 commits into
php-webdriver:communityfrom
OndraM:feature/w3c-chromedriver

Conversation

@OndraM
Copy link
Copy Markdown
Collaborator

@OndraM OndraM commented Nov 11, 2019

W3C protocol was forced to be disabled when using Chrome (#640).

But now we can remove this and let the handshake added in #560 to determine the proper protocol to use. So starting to next release of php-webdriver (1.8.0), W3C protocol will be used be default when used with Chromedriver 75+ (and also with Firefox+Geckodriver).

In case of troubles this could be still disabled using capabilities (as we do in on travis build):

$chromeOptions = new ChromeOptions();
$chromeOptions->setExperimentalOption('w3c', false);

$capabilities = DesiredCapabilities::chrome();
$capabilities->setCapability(ChromeOptions::CAPABILITY, $chromeOptions);

$driver = RemoteWebDriver::create($hostUrl, $capabilities);

Until now, W3C was forcily disabled for Chromedriver using Capabilities on startup. As we now experimentaly support W3C protocol, this is no longer needed. If W3C is detected during initial handshake, the browser will be started using W3C dialect (otherwise it will use legacy OSS JsonWire protocol).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants