Skip to content
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

[🐛 Bug]: Upgrading to WebDriver 4.2.0 throughs false positive validateCapability failures while initializing a new session #10711

Closed
MohabMohie opened this issue May 29, 2022 · 8 comments

Comments

@MohabMohie
Copy link
Contributor

What happened?

When I initialize a new chromeDriver instance with a specific chromeOptions object, several false-positive failure logs are thrown telling me that certain capabilities (that I'm not using) are not W3C compliant and I should remove them.

Expected: only relevant capabilities that I'm actually using should trigger such messages.

How can we reproduce the issue?

Import this project and run the TestClass file:
https://github.com/MohabMohie/Selenium-Java-validateCapability/tree/main/seleniumCapabilities

Or duplicate the code from this gist:
https://gist.github.com/MohabMohie/6dc76bed2faf8bb8073bd0b22fd96e1c

Relevant log output

ChromeDriver was started successfully.
May 29, 2022 11:42:51 AM org.openqa.selenium.remote.ProtocolHandshake createSession
INFO: Detected upstream dialect: W3C
May 29, 2022 11:42:52 AM org.openqa.selenium.W3CCapabilityKeysValidator validateCapability
WARNING: Support for Legacy Capabilities is deprecated; You are sending "chrome" which is an invalid capability. Please update to W3C Syntax: https://www.selenium.dev/blog/2022/legacy-protocol-support/
May 29, 2022 11:42:52 AM org.openqa.selenium.W3CCapabilityKeysValidator validateCapability
WARNING: Support for Legacy Capabilities is deprecated; You are sending "chrome" which is an invalid capability. Please update to W3C Syntax: https://www.selenium.dev/blog/2022/legacy-protocol-support/
May 29, 2022 11:42:52 AM org.openqa.selenium.W3CCapabilityKeysValidator validateCapability
WARNING: Support for Legacy Capabilities is deprecated; You are sending "networkConnectionEnabled" which is an invalid capability. Please update to W3C Syntax: https://www.selenium.dev/blog/2022/legacy-protocol-support/
May 29, 2022 11:42:52 AM org.openqa.selenium.W3CCapabilityKeysValidator validateCapability
WARNING: Support for Legacy Capabilities is deprecated; You are sending "networkConnectionEnabled" which is an invalid capability. Please update to W3C Syntax: https://www.selenium.dev/blog/2022/legacy-protocol-support/
May 29, 2022 11:42:52 AM org.openqa.selenium.W3CCapabilityKeysValidator validateCapability
WARNING: Support for Legacy Capabilities is deprecated; You are sending "platform" which is an invalid capability. Please update to W3C Syntax: https://www.selenium.dev/blog/2022/legacy-protocol-support/
May 29, 2022 11:42:52 AM org.openqa.selenium.W3CCapabilityKeysValidator validateCapability
WARNING: Support for Legacy Capabilities is deprecated; You are sending "platform" which is an invalid capability. Please update to W3C Syntax: https://www.selenium.dev/blog/2022/legacy-protocol-support/
May 29, 2022 11:42:52 AM org.openqa.selenium.W3CCapabilityKeysValidator validateCapability
WARNING: Support for Legacy Capabilities is deprecated; You are sending "javascriptEnabled" which is an invalid capability. Please update to W3C Syntax: https://www.selenium.dev/blog/2022/legacy-protocol-support/
May 29, 2022 11:42:52 AM org.openqa.selenium.W3CCapabilityKeysValidator validateCapability
WARNING: Support for Legacy Capabilities is deprecated; You are sending "javascriptEnabled" which is an invalid capability. Please update to W3C Syntax: https://www.selenium.dev/blog/2022/legacy-protocol-support/
May 29, 2022 11:42:54 AM org.openqa.selenium.devtools.CdpVersionFinder findNearestMatch
INFO: Found exact CDP implementation for version 101
May 29, 2022 11:42:54 AM org.openqa.selenium.W3CCapabilityKeysValidator validateCapability
WARNING: Support for Legacy Capabilities is deprecated; You are sending "chrome" which is an invalid capability. Please update to W3C Syntax: https://www.selenium.dev/blog/2022/legacy-protocol-support/
May 29, 2022 11:42:54 AM org.openqa.selenium.W3CCapabilityKeysValidator validateCapability
WARNING: Support for Legacy Capabilities is deprecated; You are sending "javascriptEnabled" which is an invalid capability. Please update to W3C Syntax: https://www.selenium.dev/blog/2022/legacy-protocol-support/
May 29, 2022 11:42:54 AM org.openqa.selenium.W3CCapabilityKeysValidator validateCapability
WARNING: Support for Legacy Capabilities is deprecated; You are sending "networkConnectionEnabled" which is an invalid capability. Please update to W3C Syntax: https://www.selenium.dev/blog/2022/legacy-protocol-support/
May 29, 2022 11:42:54 AM org.openqa.selenium.W3CCapabilityKeysValidator validateCapability
WARNING: Support for Legacy Capabilities is deprecated; You are sending "platform" which is an invalid capability. Please update to W3C Syntax: https://www.selenium.dev/blog/2022/legacy-protocol-support/
May 29, 2022 11:42:54 AM org.openqa.selenium.W3CCapabilityKeysValidator validateCapability
WARNING: Support for Legacy Capabilities is deprecated; You are sending "networkConnectionEnabled" which is an invalid capability. Please update to W3C Syntax: https://www.selenium.dev/blog/2022/legacy-protocol-support/
May 29, 2022 11:42:54 AM org.openqa.selenium.W3CCapabilityKeysValidator validateCapability
WARNING: Support for Legacy Capabilities is deprecated; You are sending "chrome" which is an invalid capability. Please update to W3C Syntax: https://www.selenium.dev/blog/2022/legacy-protocol-support/
May 29, 2022 11:42:54 AM org.openqa.selenium.W3CCapabilityKeysValidator validateCapability
WARNING: Support for Legacy Capabilities is deprecated; You are sending "platform" which is an invalid capability. Please update to W3C Syntax: https://www.selenium.dev/blog/2022/legacy-protocol-support/
May 29, 2022 11:42:54 AM org.openqa.selenium.W3CCapabilityKeysValidator validateCapability
WARNING: Support for Legacy Capabilities is deprecated; You are sending "javascriptEnabled" which is an invalid capability. Please update to W3C Syntax: https://www.selenium.dev/blog/2022/legacy-protocol-support/
May 29, 2022 11:42:54 AM org.openqa.selenium.W3CCapabilityKeysValidator validateCapability
WARNING: Support for Legacy Capabilities is deprecated; You are sending "networkConnectionEnabled" which is an invalid capability. Please update to W3C Syntax: https://www.selenium.dev/blog/2022/legacy-protocol-support/
May 29, 2022 11:42:54 AM org.openqa.selenium.W3CCapabilityKeysValidator validateCapability
WARNING: Support for Legacy Capabilities is deprecated; You are sending "chrome" which is an invalid capability. Please update to W3C Syntax: https://www.selenium.dev/blog/2022/legacy-protocol-support/
May 29, 2022 11:42:54 AM org.openqa.selenium.W3CCapabilityKeysValidator validateCapability
WARNING: Support for Legacy Capabilities is deprecated; You are sending "platform" which is an invalid capability. Please update to W3C Syntax: https://www.selenium.dev/blog/2022/legacy-protocol-support/
May 29, 2022 11:42:54 AM org.openqa.selenium.W3CCapabilityKeysValidator validateCapability
WARNING: Support for Legacy Capabilities is deprecated; You are sending "javascriptEnabled" which is an invalid capability. Please update to W3C Syntax: https://www.selenium.dev/blog/2022/legacy-protocol-support/
May 29, 2022 11:42:54 AM org.openqa.selenium.W3CCapabilityKeysValidator validateCapability
WARNING: Support for Legacy Capabilities is deprecated; You are sending "networkConnectionEnabled" which is an invalid capability. Please update to W3C Syntax: https://www.selenium.dev/blog/2022/legacy-protocol-support/
May 29, 2022 11:42:54 AM org.openqa.selenium.W3CCapabilityKeysValidator validateCapability
WARNING: Support for Legacy Capabilities is deprecated; You are sending "chrome" which is an invalid capability. Please update to W3C Syntax: https://www.selenium.dev/blog/2022/legacy-protocol-support/
May 29, 2022 11:42:54 AM org.openqa.selenium.W3CCapabilityKeysValidator validateCapability
WARNING: Support for Legacy Capabilities is deprecated; You are sending "platform" which is an invalid capability. Please update to W3C Syntax: https://www.selenium.dev/blog/2022/legacy-protocol-support/
May 29, 2022 11:42:54 AM org.openqa.selenium.W3CCapabilityKeysValidator validateCapability
WARNING: Support for Legacy Capabilities is deprecated; You are sending "javascriptEnabled" which is an invalid capability. Please update to W3C Syntax: https://www.selenium.dev/blog/2022/legacy-protocol-support/
May 29, 2022 11:42:54 AM org.openqa.selenium.W3CCapabilityKeysValidator validateCapability
WARNING: Support for Legacy Capabilities is deprecated; You are sending "chrome" which is an invalid capability. Please update to W3C Syntax: https://www.selenium.dev/blog/2022/legacy-protocol-support/
May 29, 2022 11:42:54 AM org.openqa.selenium.W3CCapabilityKeysValidator validateCapability
WARNING: Support for Legacy Capabilities is deprecated; You are sending "javascriptEnabled" which is an invalid capability. Please update to W3C Syntax: https://www.selenium.dev/blog/2022/legacy-protocol-support/
May 29, 2022 11:42:54 AM org.openqa.selenium.W3CCapabilityKeysValidator validateCapability
WARNING: Support for Legacy Capabilities is deprecated; You are sending "networkConnectionEnabled" which is an invalid capability. Please update to W3C Syntax: https://www.selenium.dev/blog/2022/legacy-protocol-support/
May 29, 2022 11:42:54 AM org.openqa.selenium.W3CCapabilityKeysValidator validateCapability
WARNING: Support for Legacy Capabilities is deprecated; You are sending "platform" which is an invalid capability. Please update to W3C Syntax: https://www.selenium.dev/blog/2022/legacy-protocol-support/

Operating System

Windows 11

Selenium version

Java 4.2.0

What are the browser(s) and version(s) where you see this issue?

Chrome 101

What are the browser driver(s) and version(s) where you see this issue?

ChromeDriver 101.0.4951.41

Are you using Selenium Grid?

No

@github-actions
Copy link

@MohabMohie, thank you for creating this issue. We will troubleshoot it as soon as we can.


Info for maintainers

Triage this issue by using labels.

If information is missing, add a helpful comment and then I-issue-template label.

If the issue is a question, add the I-question label.

If the issue is valid but there is no time to troubleshoot it, consider adding the help wanted label.

If the issue requires changes or fixes from an external project (e.g., ChromeDriver, GeckoDriver, MSEdgeDriver, W3C), add the applicable G-* label, and it will provide the correct link and auto-close the issue.

After troubleshooting the issue, please add the R-awaiting answer label.

Thank you!

@titusfortner
Copy link
Member

I'm guessing we need to differentiate between what the user sets and what Java is helpfully setting for the user.

@diemol
Copy link
Member

diemol commented May 30, 2022

Thank you for reporting this, it seems we add some caps in the response which should not need to be added. But there are also a few ChromeDriver adds to the response which are not W3C (e.g. chrome).

I am having a look at this now.

@diemol
Copy link
Member

diemol commented May 30, 2022

Created a ChromeDriver issue for the invalid chrome and networkConnectionEnabled caps.
https://bugs.chromium.org/p/chromedriver/issues/detail?id=4129

@diemol
Copy link
Member

diemol commented May 30, 2022

Issue created for Firefox/GeckoDriver mozilla/geckodriver#2023

@diemol diemol closed this as completed in 3334607 May 30, 2022
@diemol
Copy link
Member

diemol commented May 30, 2022

Pushed a fix and will do a patch release soon, between today and tomorrow.

@diemol
Copy link
Member

diemol commented May 30, 2022

And for MSEdgeDriver MicrosoftEdge/EdgeWebDriver#23

diemol added a commit that referenced this issue May 30, 2022
elgatov pushed a commit to elgatov/selenium that referenced this issue Jun 27, 2022
and temporarily excluding some non W3C caps
from checks since they are returned by browser
drivers.

Fixes SeleniumHQ#10711
elgatov pushed a commit to elgatov/selenium that referenced this issue Jun 27, 2022
@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked and limited conversation to collaborators Jun 30, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants