You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[1.8.0] Illegal key values seen in w3c capabilities: [platform] #676
What version of browser, browser driver and selenium server do you use?
I know why this is happening (the capabilities are indeed not yet W3C compatible), but I don't know why this is not happening to me and to tests on Travis 🤔.
changed the title [-][1.8.0] Facebook\WebDriver\Exception\UnknownServerException: Illegal key values seen in w3c capabilities: [platform][/-][+][1.8.0] Illegal key values seen in w3c capabilities: [platform][/+]on Nov 14, 2019
Also, would it be possible to provide a method somewhere that would tells us that the web driver is running in w3c mode ? Something like RemoteWebDriver::isW3cMode() : bool. That would helps users of the library to make the transition I think.
Activity
OnkelTem commentedon Nov 14, 2019
Same here.
After quick debugging I found that this 1.8.x addition to
\Facebook\WebDriver\Remote\RemoteWebDriver::create:is leading to the problem.
So it's probably related to W3C WebDriver protocol.
UPDATE.
Yep. The real problem is actually displayed in the error message: there is not such key as
platformif using W3C WebDriver protocol (which is now the default one, eh?)The spec expects it to be
platformName: https://w3c.github.io/webdriver/#capabilitiesIn my code I do something like:
and
DesiredCapabilities::chrome()function returns:-- where
WebDriverCapabilityType::PLATFORM==platform.Replacing it with
platformNamein the WebDriverCapabilityType fixes the problem.OndraM commentedon Nov 14, 2019
What version of browser, browser driver and selenium server do you use?
I know why this is happening (the capabilities are indeed not yet W3C compatible), but I don't know why this is not happening to me and to tests on Travis 🤔.
Lctrs commentedon Nov 14, 2019
Chrome 78.0.3904.97
Chromedriver 78.0.3904.70
Took from my travis job.
OnkelTem commentedon Nov 14, 2019
Chrome 77.0.3865.75
ChromeDriver 77.0.3865.40
OndraM commentedon Nov 14, 2019
Oh, I see. Well, we are apparently not sending platform requirements as part of capabilities in tests, while you are - is this correct?
Lctrs commentedon Nov 14, 2019
I am calling the static factories
Facebook\WebDriver\Remote\DesiredCapabilities::(chrome|firefox)at some point in my test.OndraM commentedon Nov 14, 2019
Right, so this is the issue, we add the incompatible platform ourselves 🙊
https://github.com/facebook/php-webdriver/blob/ec7ce5b611e3a73eb789c783760487c89b4999a1/lib/Remote/DesiredCapabilities.php#L199
It seems some kind of Capabilities conversion to W3C compatible ones will be needed in the end. I'm on it 🚀
Add convertor to W3C compatible capabilitites (fixes #676, part of #469)
Add convertor to W3C compatible capabilities (fixes #676, part of #469)
Add convertor to W3C compatible capabilities (fixes #676, part of #469)
OndraM commentedon Nov 14, 2019
Ok, the implementation should be ready (see #678).
Could you @Lctrs @OnkelTem please test your projects with branch
w3c-capabilitites?[-][1.8.0] Facebook\WebDriver\Exception\UnknownServerException: Illegal key values seen in w3c capabilities: [platform][/-][+][1.8.0] Illegal key values seen in w3c capabilities: [platform][/+]Lctrs commentedon Nov 14, 2019
@OndraM here is the build : https://travis-ci.org/Lctrs/mink-panther-driver/builds/612038066 (ref PR : https://github.com/Lctrs/mink-panther-driver/pull/31). Much better. I would say that remaining errors are on my side. Good job !
Also, would it be possible to provide a method somewhere that would tells us that the web driver is running in
w3cmode ? Something likeRemoteWebDriver::isW3cMode() : bool. That would helps users of the library to make the transition I think.OndraM commentedon Nov 14, 2019
Didn't check, but are you sure the errors are not related to W3C mode? There seems to be quite a lot of failed builds :).
To see whether you are running W3C mode or not, you can use
isW3cCompliant()method of RemoteWebDriver, which is already there.Lctrs commentedon Nov 14, 2019
At first glance, they seem to be related to things that has been removed in W3C mode. I'm also hitting a bug not related to W3C mode.
Didn't known this one. Thanks :)
OnkelTem commentedon Nov 14, 2019
At first I thought it didn't work, due to this error message in my logs:
But then I could nail down what raised this error:
If I comment this line out, my script does its job. It seems like I should have used some other command to maximize the window...
This is my initialization part:
OndraM commentedon Nov 15, 2019
@OnkelTem I added the missing W3C compatible maximize command (amongst few others) in #679 , so once this is merged, it should start working for you.