-
Notifications
You must be signed in to change notification settings - Fork 30
window.screen width and height values aren't changed to the profile's emulation values #29
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
Comments
Actually, it seems that this line |
When I execute this directly on the driver instance after mydriver.start finishes it changes those values driver.execute_cdp_cmd("Emulation.setDeviceMetricsOverride", {
"deviceScaleFactor": 3,
"width": 390,
"height": 844,
"screenWidth": 390,
"screenHeight": 844,
"mobile": True
}) |
Wonder why it doesn't work. Stack trace should be Noticed some time ago, that after initializing the driver, it needs to wait some time bevore executing all the EDIT: @nradosevic Or do you mean, that the window on your Desktop is to big? I that case, yes, that's a bug, undetected-chromedriver#1100 in undetected-chromedriver at undetected_chromedriver/init.py#L379, because it adds some arguments by default. |
I am puzzled how window.screen values are correct in your case. In my case I found a problem. Problem is that the emulation object in the default profiles is lacking those options: After adding those to the default profiles, it works for me too |
Oh I see
Also, this likely doesn't have anything to do with with |
Not sure because I remember on UC discussions people complaining regarding this, but might be as you said so both packages suffer from this |
Implemented with 6f25990 |
Uh oh!
There was an error while loading. Please reload this page.
Describe the bug
window.screen
width
andheight
values aren't changed to the profile's emulation values. Might actually be undetected chromedriver's fault because it doesn't supportmobileEmulation
experimental option, but anyway would be really meaningful to find a workaroundTo Reproduce
Run the code from the example, using any profile (Desktop or Android) and check the window.screen values in dev tools
Expected behavior or error-message
window.screen width and height values should get the value
Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: