[🐛 Bug]: [py] Can't set small window size #15590
Labels
A-needs-triaging
A Selenium member will evaluate this soon!
C-py
Python Bindings
D-chrome
I-defect
Something is not working as intended
OS-linux
Description
I can't set the browser window size to small values (i.e. 400x400) with Chrome. For example,
driver.set_window_size(400, 400)
has no effect, butdriver.set_window_size(600, 600)
works fine?Is there some kind of a minimum for changing window size? If so, perhaps we can raise an error if requesting a window size that is too small.
This is probably a ChromeDriver issue, but wanted to report it here.
Update:
Pretty much every browser handles this weird, but can set larger window sizes fine. Unlike Chrome (which doesn't resize at all), the other browsers resize to something different than what I request. (Not sure if the size I request only accounts for the viewport, but the entire browser is included in the size it returns? But why does it work for larger sizes?)
To summarize:
calling
driver.set_window_size(400, 400)
with Chrome returns:{'width': 1050, 'height': 844}
calling
driver.set_window_size(400, 400)
with Edge returns:{'width': 501, 'height': 400}
calling
driver.set_window_size(400, 400)
with Firefox returns:{'width': 488, 'height': 400}
calling
driver.set_window_size(400, 400)
with WebKitGTK returns:{'width': 462, 'height': 400}
Reproducible Code
Debugging Logs
The text was updated successfully, but these errors were encountered: