-
Notifications
You must be signed in to change notification settings - Fork 845
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Selenium 4 removing support for DesiredCapabilities #1033
Comments
If I recall, this is the section which we'll have to adjust: https://github.com/php-webdriver/php-webdriver/blob/main/lib/Remote/RemoteWebDriver.php#L111-L130 specifically:
|
Docker chrome 107 does not work with json wire protocol anymore. We use json wire protocl in all our tests. After docker-selenium newest release last week, even with older selenium server (4.5.3 or 3.0.0) specified in the grid via docker-compose-v3.yml, all our tests failed, mostly with "Facebook\WebDriver\Exception\UnknownErrorException : non-positive contentLength: 0". The test would pass if the docker chrome node is 106 and earlier. Right now I am not able to run tests on docker chrome 107 on selenium grid or selenium standalone configuration. I can, however, run test on local 107 chrome driver, just not from the docker chrome container. // @see https://w3c.github.io/webdriver/webdriver-spec.html#handling-errors |
Removal of JsonWire protocol should be part of php-webdriver 2.0, see #657 . Desired capabilities (in terms of W3C protocol) are however not removed - https://w3c.github.io/webdriver/#capabilities They are and always have been part of session initialization (we use the legacy term "desired capabilities" though). What Java WebDriver bindings are doing, is removing the "DesiredCapabilities" class, as they provide a different way how to setup the session (via So from protocol point of view, there is nothing forcing us to change this, as we already use "capabilities" key for W3C-compatible session setup and nothing will stop working when using W3C protocol. A different thing is, however, if we don't want to change the session initialization to be similar to the java-one or to refactor it to some more user-friendly and more modern PHP-way. |
Bug description
As noted here, Selenium 4 will soon be removing support for the JsonWire prototocol. This will include removal of support for the DesiredCapabiliies which (I believe/recall) this driver currently includes for optimal compatibility with a wide range of drivers.
How could the issue be reproduced
It can't yet, but we should consider how to handle this now.
Expected behavior
We should probably drop support for the JsonWire protocol entirely in the long run, but perhaps we can get there by explicitly requesting a JsonWire connection for now when one is needed.
Php-webdriver version
main
PHP version
any
How do you start the browser driver or Selenium server
Selenium
Selenium server / Selenium Docker image version
Future
Browser driver (chromedriver/geckodriver...) version
n/a
Browser name and version
n/a
Operating system
n/a
Additional context
I came across this blog post from SeleniumHQ discussing their plans to drop JsonWire support entirely: https://www.selenium.dev/blog/2022/legacy-protocol-support/
In the issue discussing this removal, a developer has specifically asked if the intent is to deprecate DesiredCapabilities, and @titusfortner has confirmed that this is the intent: SeleniumHQ/selenium#10374 (comment)
The text was updated successfully, but these errors were encountered: