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

Merging of InternetExplorerOptions doesn't work #9143

Closed
JohnA2 opened this issue Feb 4, 2021 · 4 comments
Closed

Merging of InternetExplorerOptions doesn't work #9143

JohnA2 opened this issue Feb 4, 2021 · 4 comments

Comments

@JohnA2
Copy link

JohnA2 commented Feb 4, 2021

🐛 Bug Report

This is a follow up for #5279 as requested in #5279 (comment)

To Reproduce

Use InternetExplorerOptions.merge()

Expected behavior

Browser specific parameters in descendants of MutableCapabilities work after merging them.

Test script or set of commands reproducing this issue

InternetExplorerOptions options1 = new InternetExplorerOptions();
InternetExplorerOptions options2 = new InternetExplorerOptions();
options1.useCreateProcessApiToLaunchIe().addCommandSwitches("-private");
options1.merge(options2);
WebDriver driver = new InternetExplorerDriver(options1); // IE doesn't start in private mode

Environment

OS: Windows (any version)
Browser: Internet Explorer
Browser version: 11
Browser Driver version: IEDriver 3.150.1
Language Bindings version: Java 4.0.0-alpha-7

@JohnA2
Copy link
Author

JohnA2 commented Feb 22, 2021

@barancev So the above test code now works correctly in beta-1, but the reverse merge combination (if you replace options1 with options2 on line 3 of my code) that worked in alpha-7 is now broken.

@barancev
Copy link
Member

merge method does not modify the object it is called in, it creates a new object that contains merged data.

@JohnA2
Copy link
Author

JohnA2 commented Feb 22, 2021

ok. Still, this code doesn't work:

InternetExplorerOptions options1 = new InternetExplorerOptions();
InternetExplorerOptions options2 = new InternetExplorerOptions();
options2.useCreateProcessApiToLaunchIe().addCommandSwitches("-private");
InternetExplorerOptions options3 = options2.merge(options1);
WebDriver driver = new InternetExplorerDriver(options3); // IE doesn't start in private mode

@barancev barancev reopened this Feb 23, 2021
@barancev
Copy link
Member

A better fix provided by commit 0da772d

@github-actions github-actions bot locked and limited conversation to collaborators Sep 5, 2021
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

2 participants