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]: Chrome "--window-size" option doesn't work when using "--headless=new" mode #11706

Closed
daomien opened this issue Feb 24, 2023 · 3 comments
Labels
G-chromedriver Requires fixes in ChromeDriver

Comments

@daomien
Copy link

daomien commented Feb 24, 2023

What happened?

After update chrome and chromedriver to version 110.
In Chrome browser, I have set options as:

      options.addArguments("--headless=new");
      options.addArguments("--window-size=1920,1080");

but when I debug it the window-size: 1036x780 is shown as default.
Could you please help to check this issue? Thank you!

How can we reproduce the issue?

options.addArguments("--headless=new");
options.addArguments("--window-size=1920,1080");

Relevant log output

15:24:52   Starting ChromeDriver 110.0.5481.77 (65ed616c6e8ee3fe0ad64fe83796c020644d42af-refs/branch-heads/5481@{#839}) on port 52244
15:24:52   Only local connections are allowed.
15:24:52   Please see https://chromedriver.chromium.org/security-considerations for suggestions on keeping ChromeDriver safe.
15:24:52   ChromeDriver was started successfully.
15:24:56   [1677227096.364][WARNING]: virtual void DevToolsClientImpl::AddListener(DevToolsEventListener *) subscribing a listener to the already connected DevToolsClient. Connection notification will not arrive.
15:24:56   Feb 24, 2023 8:24:56 AM org.openqa.selenium.remote.ProtocolHandshake createSession
15:24:56   INFO: Detected dialect: W3C
15:24:56   Feb 24, 2023 8:24:56 AM org.openqa.selenium.devtools.CdpVersionFinder findNearestMatch
15:24:56   WARNING: Unable to find an exact match for CDP version 110, so returning the closest version found: a no-op implementation
15:24:56   Feb 24, 2023 8:24:56 AM org.openqa.selenium.devtools.CdpVersionFinder findNearestMatch
15:24:56   INFO: Unable to find CDP implementation matching 110.
15:24:56   Feb 24, 2023 8:24:56 AM org.openqa.selenium.chromium.ChromiumDriver lambda$new$3
15:24:56   WARNING: Unable to find version of CDP to use for . You may need to include a dependency on a specific version of the CDP using something similar to `org.seleniumhq.selenium:selenium-devtools-v86:4.1.2` where the version ("v86") matches the version of the chromium-based browser you're using and the version number of the artifact is the same as Selenium's.
15:24:58   2023-02-24-08:24:58 INFO  DEBUG: CREATED DRIVER SUCCESSFULLY with COUNT 2 and Map Size 1
15:24:58   2023-02-24-08:24:58 INFO  Width x Height is 1036x780

Operating System

Windows 10

Selenium version

4.1.2

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

110

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

ChromeDriver 110.0.5481.77

Are you using Selenium Grid?

No

@github-actions
Copy link

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

@daomien daomien changed the title [🐛 Bug]: Chrome unable to set "--window-size" option when using "--headless=new" mode [🐛 Bug]: Chrome "--window-size" option doesn't work when using "--headless=new" mode Feb 24, 2023
@diemol diemol added G-chromedriver Requires fixes in ChromeDriver and removed I-defect needs-triaging labels Feb 24, 2023
@github-actions
Copy link

Hi, @daomien.
This issue has been determined to require fixes in ChromeDriver.

You can see if the feature is passing in the Web Platform Tests.

If it is something new, please create an issue with the ChromeDriver team.
Feel free to comment the issues that you raise back in this issue. Thank you.

Copy link

github-actions bot commented Dec 9, 2023

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 Dec 9, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
G-chromedriver Requires fixes in ChromeDriver
Projects
None yet
Development

No branches or pull requests

2 participants