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

Warning about legacy capabilities #1862

Closed
svschouw-bb opened this issue Jun 17, 2022 · 3 comments · Fixed by #1870
Closed

Warning about legacy capabilities #1862

svschouw-bb opened this issue Jun 17, 2022 · 3 comments · Fixed by #1870
Assignees
Labels
Milestone

Comments

@svschouw-bb
Copy link

The problem

When running selenide we get the warnings:

Jun 17, 2022 7:37:30 PM org.openqa.selenium.remote.RemoteWebDriver startSession
WARNING: Support for Legacy Capabilities is deprecated; You are sending the following invalid capabilities: [acceptSslCerts, handlesAlerts, javascriptEnabled, takesScreenshot]; Please update to W3C Syntax: https://www.selenium.dev/blog/2022/legacy-protocol-support/
Jun 17, 2022 7:37:32 PM org.openqa.selenium.remote.ProtocolHandshake createSession
WARNING: Support for Legacy Capabilities is deprecated; You are sending the following invalid capabilities: [acceptSslCerts, handlesAlerts, javascriptEnabled, takesScreenshot]; Please update to W3C Syntax: https://www.selenium.dev/blog/2022/legacy-protocol-support/

Details

Not super important, but we have some test protections in place that no unexpected warnings are logged. These warnings trigger those protections. We can add them to the list of "expected exceptions" as a temporary workaround.

Tell us about your environment

  • Selenide Version: 6.6.3
  • Chrome\Firefox\IE Version: Starting ChromeDriver 102.0.5005.61
  • Browser Driver Version: Starting ChromeDriver 102.0.5005.61
  • Selenium Version: 4.2.2

Code To Reproduce Issue [ Good To Have ]

public class SimpleSelenideTest {
	@Test
	void simpleTest() {
		Selenide.open("https://www.google.com/");
		System.out.println(Selenide.title());
	}
}
@asolntsev
Copy link
Member

@svschouw-bb This is Selenium issue, not Selenide. See SeleniumHQ/selenium#10711.
Until it's fixed in Selenium/chromedriver/geckodriver/etc. you can configure your logging to ignore warnings from org.openqa.selenium.W3CCapabilityKeysValidator (set its loggerLevel to ERROR).

@asolntsev asolntsev self-assigned this Jun 17, 2022
@svschouw-bb
Copy link
Author

Thank you for responding so fast.

I feel like the problem comes from com.codeborne.selenide.webdriver.AbstractDriverFactory.createCommonCapabilities(T, Config, Browser, Proxy) which uses all kinds of deprecated capabilities. Although I'm not sure what the alternatives should be.

The loggers that log these are org.openqa.selenium.remote.RemoteWebDriver and org.openqa.selenium.remote.ProtocolHandshake logging on level WARNING.

asolntsev added a commit that referenced this issue Jun 24, 2022
Replaced by "unhandledPromptBehavior=accept" (Is it the same?)
asolntsev added a commit that referenced this issue Jun 24, 2022
I didn't find any replacement. Is it enabled by default in all browsers?
asolntsev added a commit that referenced this issue Jun 24, 2022
I didn't find any replacement. Is it enabled by default in all browsers?
@asolntsev asolntsev added this to the 6.6.6 milestone Jun 24, 2022
@asolntsev asolntsev linked a pull request Jun 24, 2022 that will close this issue
@asolntsev
Copy link
Member

@svschouw-bb @AlexChernookov Well, it seems the problem was not only in Selenium, but in Selenide too.
Hope PR #1870 will fix it. Going to release it as Selenide 6.6.6

asolntsev added a commit that referenced this issue Jun 24, 2022
Replaced by "unhandledPromptBehavior=accept" (Is it the same?)
asolntsev added a commit that referenced this issue Jun 24, 2022
I didn't find any replacement. Is it enabled by default in all browsers?
asolntsev added a commit that referenced this issue Jun 24, 2022
I didn't find any replacement. Is it enabled by default in all browsers?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants