-
-
Notifications
You must be signed in to change notification settings - Fork 8.4k
[🐛 Bug]: Message KeyError 'width' while trying to get_window_size() does not provide detailed information #15503
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
@aikfiend, thank you for creating this issue. We will troubleshoot it as soon as we can. Info for maintainersTriage this issue by using labels.
If information is missing, add a helpful comment and then
If the issue is a question, add the
If the issue is valid but there is no time to troubleshoot it, consider adding the
If the issue requires changes or fixes from an external project (e.g., ChromeDriver, GeckoDriver, MSEdgeDriver, W3C),
add the applicable
After troubleshooting the issue, please add the Thank you! |
… and get_window_position (SeleniumHQ#15503)
Can you provide some code to reproduce this? |
yep, but let me ask you first if you really try to reproduce it using the code provided |
If you provide code that can reproduce it, Someone will attempt to reproduce it... or at least understand the scenario under which it occurs. |
… and get_window_position (SeleniumHQ#15503)
closing since OP never provided code to reproduce. |
see description for code to reproduce the issue |
Hi, @aikfiend. Either a complete code snippet and URL/HTML (if more than one file is needed, provide a GitHub repo and instructions to run the code), the specific versions used, or a more detailed description to help us understand the issue. Note: If you cannot share your code and URL/HTML, any complete code snippet and URL/HTML that reproduces the issue is good enough. Reply to this issue when all information is provided. Thank you. |
Please provide a full example of code showing how to reproduce this. The one line you provided is not sufficient. You also need to provide a URL/HTML where this can be reproduced, along with debug logs: https://www.selenium.dev/documentation/webdriver/troubleshooting/logging/ Also, provide the browser/driver versions and operating system you are using (as was asked for in the issue template) |
Did you saw this: And device geoip from description? |
Please provide the debug logs. Does this happen on browsers besides Mobile Safari? (like desktop Safari or Chrome?) |
What happened?
So from the user's point of view, it is not clear on which side the error is, the webdriver itself or the remote web server.
How can we reproduce the issue?
As requested in the comment:
https://github.com/aikfiend/python-selenium-browserstack/tree/get-window-size-key-error
Please note that the code of the test provided does not reproduce the issue in 100% of cases, as the issue itself reproduces from time to time, depending on a remote web server. You may require hundreds or more retries.
In the period from 2025-03-11 to 2025-04-21, I was able to catch it 20 times running tests in 24/7 mode in Browserstack Automate. Commonly, it failed in Chrome and Safari on mobile devices.
Relevant log output
Let the sentry speak for itself
Operating System
Any
Selenium version
4.31.0 (trunk)
What are the browser(s) and version(s) where you see this issue?
Any
What are the browser driver(s) and version(s) where you see this issue?
Any
Are you using Selenium Grid?
No response
The text was updated successfully, but these errors were encountered: