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]: ChromiumOptions: android-specific options are removed after merge #14133

Closed
kool79 opened this issue Jun 13, 2024 · 3 comments · Fixed by #14217
Closed

[🐛 Bug]: ChromiumOptions: android-specific options are removed after merge #14133

kool79 opened this issue Jun 13, 2024 · 3 comments · Fixed by #14217

Comments

@kool79
Copy link
Contributor

kool79 commented Jun 13, 2024

What happened?

  1. Create ChromiumOptions (ChromeOptions) and set android-specific properties (activity/package/sn/process)
  2. Create MutableCapabilities (empty one)
  3. Merge ChromiumOptions with Mutable capabilities
    Expected: result contain the chromiumOptions
    Actual: all android-related options (from
    the ChromiumOptions.androidOptions field) are removed
    scr_20240614T01_18_10

How can we reproduce the issue?

var original = new ChromeOptions();
		original.setAndroidActivity("co_activity");
		original.setAndroidPackage("co_package");
		original.setExperimentalOption("experimental", "co_experimental");
		original.addArguments("--co_argument");

		System.out.println("Original :: " + original.asMap());

		var caps = new MutableCapabilities();
		var merged = original.merge(caps);

		System.out.println("Merged   :: " + merged.asMap());

Relevant log output

Original :: {browserName=chrome, goog:chromeOptions={androidActivity=co_activity, androidPackage=co_package, args=[--co_argument], experimental=co_experimental, extensions=[]}}
Merged   :: {browserName=chrome, goog:chromeOptions={args=[--co_argument], experimental=co_experimental, extensions=[]}}

Operating System

windows 10

Selenium version

java 4.21.0

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

n/a

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

n/a

Are you using Selenium Grid?

n/a

Copy link

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

@iampopovich
Copy link
Contributor

I suspect that the issue lies in the ChromiumOptions.mergeInPlace method. I am trying to understand in detail how it copies capabilities and whether the name affects their copying in our case.

Copy link

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

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

Successfully merging a pull request may close this issue.

4 participants