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

[🚀 Feature]: W3C Capabilities of InternetExplorerOptions #10822

Closed
alaahong opened this issue Jun 28, 2022 · 9 comments
Closed

[🚀 Feature]: W3C Capabilities of InternetExplorerOptions #10822

alaahong opened this issue Jun 28, 2022 · 9 comments
Milestone

Comments

@alaahong
Copy link
Member

Feature and motivation

Once we execute with Edge IE Mode, there is warn in log

Support for Legacy Capabilities is deprecated; You are sending the following invalid capabilities: [elementScrollBehavior, enablePersistentHover, ie.browserCommandLineSwitches, ie.edgechromium, ie.edgepath, ie.enableFullPageScreenshot, ie.ensureCleanSession, ie.fileUploadDialogTimeout, ie.forceCreateProcessApi, ie.useLegacyFileUploadDialogHandling, ie.usePerProcessProxy, ignoreProtectedModeSettings, ignoreZoomSetting, initialBrowserUrl, nativeEvents, requireWindowFocus, silent]; Please update to W3C Syntax: https://www.selenium.dev/blog/2022/legacy-protocol-support/

I tried to set almost values from docs (https://www.selenium.dev/documentation/webdriver/capabilities/internet_explorer/), I'm sure there are some capabilities expired in Edge IE Mode ( as we should only have this way to run IE at this moment), but what's the qualified capability?
And meanwhile, there won't any Deprecated in InternetExplorerOptions, so user don't know what should be using with latest Selenium.

Usage example

Full configurations case

  @Test
  public void internetExplorerOptionsTest() {
    ieOptions = new InternetExplorerOptions();
    ieOptions.attachToEdgeChrome();
    ieOptions.ignoreZoomSettings();
    ieOptions.destructivelyEnsureCleanSession();
    ieOptions.requireWindowFocus();
    ieOptions.introduceFlakinessByIgnoringSecurityDomains();
    ieOptions.takeFullPageScreenshot();
    ieOptions.disableNativeEvents();
    ieOptions.waitForUploadDialogUpTo(Duration.ofMillis(1000L));
    ieOptions.useLegacyUploadDialog();
    ieOptions.elementScrollTo(ElementScrollBehavior.TOP);
    ieOptions.enablePersistentHovering();
    ieOptions.usePerProcessProxy();
    ieOptions.useCreateProcessApiToLaunchIe();
    ieOptions.addCommandSwitches("-k");
    ieOptions.addCommandSwitches("-private");
    ieOptions.setCapability("silent", true);
    ieOptions.withEdgeExecutablePath("C:\\Program Files (x86)\\Microsoft\\Edge\\Application\\msedge.exe");
    ieOptions.withInitialBrowserUrl("https://www.ianzhang.cn");
    driver = new InternetExplorerDriver(ieOptions);
    driver.get("https://www.bing.com");
  }
Support for Legacy Capabilities is deprecated; You are sending the following invalid capabilities: [elementScrollBehavior, enablePersistentHover, ie.browserCommandLineSwitches, ie.edgechromium, ie.edgepath, ie.enableFullPageScreenshot, ie.ensureCleanSession, ie.fileUploadDialogTimeout, ie.forceCreateProcessApi, ie.useLegacyFileUploadDialogHandling, ie.usePerProcessProxy, ignoreProtectedModeSettings, ignoreZoomSetting, initialBrowserUrl, nativeEvents, requireWindowFocus, silent]; Please update to W3C Syntax: https://www.selenium.dev/blog/2022/legacy-protocol-support/

Minimal Case

  @Test
  public void internetExplorerOptionsInputTest() {
    ieOptions = new InternetExplorerOptions();
    ieOptions.attachToEdgeChrome();
    ieOptions.withEdgeExecutablePath("C:\\Program Files (x86)\\Microsoft\\Edge\\Application\\msedge.exe");
    driver = new InternetExplorerDriver(ieOptions);
    driver.get("https://www.bing.com");
  }
Started InternetExplorerDriver server (64-bit)
4.2.0.0
Listening on port 63513
Only local connections are allowed
6月 28, 2022 4:11:23 下午 org.openqa.selenium.remote.ProtocolHandshake createSession
INFO: Detected upstream dialect: W3C
6月 28, 2022 4:11:23 下午 org.openqa.selenium.remote.ProtocolHandshake createSession
WARN: Support for Legacy Capabilities is deprecated; You are sending the following invalid capabilities: [ie.edgechromium, ie.edgepath]; Please update to W3C Syntax: https://www.selenium.dev/blog/2022/legacy-protocol-support/

@github-actions
Copy link

@alaahong, 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!

@diemol
Copy link
Member

diemol commented Jun 28, 2022

What version of Selenium?

@alaahong
Copy link
Member Author

alaahong commented Jun 28, 2022

Hi @diemol
It's Selenium 4.3.0 with IE Driver 4.2.0 .
OS is Windows 11
Edge is 103

@diemol diemol added this to the 4.4 milestone Jun 28, 2022
@diemol
Copy link
Member

diemol commented Jun 28, 2022

Thanks, I was able to see the log warnings. That was a mistake I did, the validation is done properly in the RemoteWebDriver but not so well in ProtocolHandshake. This is all part of the process to remove JWP support in Java.

The issue with InternetExplorerOptions is that capabilities are being put at the top level and inside se:ieOptions, and it is only needed in se:ieOptions. This change was already planned.

I just pushed a change that will avoid those warnings when 4.4 is released since all capabilities will be inside se:ieOptions.

@diemol diemol closed this as completed in cc79de6 Jun 28, 2022
@alaahong
Copy link
Member Author

Thanks for your following, it's fine in next version. Just wonder if any deprecated capabilities list of IE Driver ? As I mentioned in #10821 , seems not all capabilities still work on latest Edge IE Mode.

@diemol
Copy link
Member

diemol commented Jun 28, 2022

It depends on what the Edge team determines. They are being kind enough by maintaining the IEDriver these days. If not all caps are working in IE Mode, those issues should be reported to them. (See comments in the issue you linked)

@1merzoua
Copy link

It depends on what the Edge team determines. They are being kind enough by maintaining the IEDriver these days. If not all caps are working in IE Mode, those issues should be reported to them. (See comments in th

Hello @diemol,

Thanks for your reply,

Have you any idea about the release date of the new IE Driver version ?

@diemol
Copy link
Member

diemol commented Jun 28, 2022

Not sure, I think there are no pending changes to be released.

@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 Jul 29, 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