Skip to content

[🐛 Bug]: Chrome Driver 137.0.7151.5500 resolution scaling issues #15851

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

Closed
ciconq opened this issue Jun 3, 2025 · 5 comments
Closed

[🐛 Bug]: Chrome Driver 137.0.7151.5500 resolution scaling issues #15851

ciconq opened this issue Jun 3, 2025 · 5 comments
Labels
G-chromedriver Requires fixes in ChromeDriver

Comments

@ciconq
Copy link

ciconq commented Jun 3, 2025

Description

Hello,

I am running tests both locally and on an agent(Azure DevOps) that is on a virtual server - Microsoft Windows Server 2022 Standard. The tests are ran under the --headless=new flag. Some tests have bigger grids which are not always displayed on the entire screen but they were working fine under Chrome Driver 135.0.7049.4200.
I had to add the following flags for them to pass again:

--force-device-scale-factor=0.75
--high-dpi-support=0.75

This was working fine both locally and on the server until I had to upgrade to Chrome Driver 137.0.7151.5500.

Now I am noticing some really strange resolution scaling when running tests with different permutations of flags/settings.

1st permutation: Removing both flags from Chrome Driver settings
Resulted in having same resolution both on the server and locally - 800x600 when running tests in headless.
Running them in non-headless resulted in having a resolution -1032x776 on the server and - 1552x928 locally.

2nd permutation: Removing both flags from Chrome Driver settings but having flag --window-size=1920,1080
Resulted in having same resolution both on the server and locally - 800x600 when running tests in headless.
Running them in non-headless resulted in having a resolution - 1032x776 on the server and - 1552x928 locally(same as 1st permutation).

3rd permutation: Removing both flags from Chrome Driver settings but having resolution set via the driver
Resulted in having same resolution both on the server and locally - 800x600 when running tests in headless.
Running them in non-headless resulted in having a resolution -1032x776 on the server and - 1552x928 locally(same as 1st and 2nd permutations).

4th permutation: Having both flags --force-device-scale-factor and --high-dpi-support set to 0.75 without any additional resolution flags/settings
Resulted in having same resolution both on the server and locally - 1423x1067 when running tests in headless.
Running them in non-headless resulted in having a resolution -1377x1036 on the server and - 2584x1544 locally.

5th permutation: Having only --force-device-scale-factor flag set to 0.75 without any additional resolution flags/settings Resulted in having same resolution both on the server and locally - 1423x1067 when running tests in headless.
Running them in non-headless resulted in having a resolution -1377x1036 on the server and - 2584x1544 locally(same as 4th permutation).

6th permutation: Having only --force-device-scale-factor flag set to 0.7 without any additional resolution flags/settings Resulted in having same resolution both on the server and locally - 1633x1226 when running tests in headless.
Running them in non-headless resulted in having a resolution -1475x1109 on the server and - 2769x1655 locally(this worked both locally and on the server for headless, for non-headless it worked only locally, I guess it failed on the server due to the nearly double less in size resolution).

What I can see is that the resolution is the same when running tests in --headless=new both on the server and locally for all of the mentioned permutations. On the other hand I guess having different resolution when running tests in non-headless both on the server and locally might be normal.

Additionally I suspect that the resolution was different when running tests in headless both on the server and locally for Chrome Driver 135.0.7049.4200 but I am not sure but at least it was not defaulting to such low resolution like 800x600(not sure if adding the --disable-mobile-emulation flag might help but I don't see why it would).

P.S. Tried pretty much all of those permutations with Selenium 4.33.0 but still the same outcome(also if it matters I am using a 16 inch laptop with a resolution of 1920x1200 if that matters, not sure about the server though).

Would really appreciate any ideas or suggestions.

Thank you for your time and attention reading this!

Reproducible Code

Those are the flags that I am initializing a Chrome Driver of based on the mentioned permutations:

var options = new ChromeOptions();

options.AddArgument("--window-size=1920,1080");
options.AddArguments("--force-device-scale-factor=0.75");
options.AddArguments("high-dpi-support=0.75");

return new ChromeDriver(chromeDriverService, options);

Setting the driver window size from the driver itself:

Driver.Manage().Window.Size = new Size(1920, 1080);

ℹ️ Last known working version: 4.27.0

@ciconq ciconq added I-defect Something is not working as intended A-needs-triaging A Selenium member will evaluate this soon! labels Jun 3, 2025
@github-actions github-actions bot added C-dotnet .NET Bindings D-chrome I-regression Something was working but we "fixed" it OS-windows labels Jun 3, 2025
@selenium-ci
Copy link
Member

@ciconq, thank you for creating this issue. We will troubleshoot it as soon as we can.

Selenium Triage Team: remember to follow the Triage Guide

Copy link

github-actions bot commented Jun 3, 2025

⚠️ You reported using Selenium version 4.27.0, but the latest release is 4.33.

Please verify that this issue still occurs with the latest version. If it no longer applies, you can close this issue or update your comment.

This issue will be marked "awaiting answer" and may be closed automatically if no response is received.

@github-actions github-actions bot added J-awaiting answer Question asked of user; a reply moves it to triage again and removed A-needs-triaging A Selenium member will evaluate this soon! labels Jun 3, 2025
@ciconq
Copy link
Author

ciconq commented Jun 3, 2025

As mentioned above using Selenium 4.33.0 doesn't resolve this issue.

@diemol
Copy link
Member

diemol commented Jun 4, 2025

The only suggestion is that the correct syntax is:

options.AddArgument("--window-size=1920x1080");

Aside from that, it all looks like Chrome has changed its behavior. You should ask them,

@diemol diemol added G-chromedriver Requires fixes in ChromeDriver and removed D-chrome J-awaiting answer Question asked of user; a reply moves it to triage again C-dotnet .NET Bindings I-defect Something is not working as intended I-regression Something was working but we "fixed" it OS-windows labels Jun 4, 2025
@selenium-ci
Copy link
Member

Hi, @ciconq.
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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
G-chromedriver Requires fixes in ChromeDriver
Projects
None yet
Development

No branches or pull requests

3 participants