Unable to restore a minimized window through DevTools protocol on Linux |
|||||
Issue description
Chrome Version: 70.0.3538.102
OS: Linux
After minimizing a Chrome window through DevTools, attempting to restore the window through DevTools has no effect, and the window remains minimized.
The following Python script uses ChromeDriver to repro this issue:
from selenium import webdriver
driver = webdriver.Chrome()
driver.minimize_window()
driver.set_window_rect(height=450, width=450)
driver.quit()
What is the expected result?
The browser window is minimized and then restored to a normal window, without any errors.
What happens instead?
The attempt to set window size fails and throws an exception, as ChromeDriver isn't able to restore the window through DevTools. The browser window remains minimized.
ChromeDriver sends a Browser.setWindowBounds command with
{
"bounds": {
"windowState": "normal"
},
"windowId": 1745231867
}
It then sends a Browser.getWindowBounds command. The returned value shows that the window is still minimized:
{
"bounds": {
"height": 1394,
"left": 10,
"top": 10,
"width": 1265,
"windowState": "minimized"
}
}
This worked fine in Chrome m69, and in early builds of m70, up to 70.0.3538.31. The regression appears to be caused by r593711, which was first landed in m71 and then merged into m70.
,
Nov 29
,
Dec 3
You need to specify the size along with the 'normal' state.
,
Dec 4
Specifying the size along with the 'normal' state doesn't help:
[1543884498.023][DEBUG]: DevTools WebSocket Command: Browser.getWindowForTarget (id=38) browser {
"targetId": "1128D0E5116FDE11F5B960452F48CFB8"
}
[1543884498.023][DEBUG]: DevTools WebSocket Response: Browser.getWindowForTarget (id=38) browser {
"bounds": {
"height": 600,
"left": 0,
"top": 0,
"width": 800,
"windowState": "minimized"
},
"windowId": 1
}
[1543884498.023][DEBUG]: DevTools WebSocket Command: Browser.setWindowBounds (id=39) browser {
"bounds": {
"height": 600,
"left": 0,
"top": 0,
"width": 800,
"windowState": "normal"
},
"windowId": 1
}
[1543884498.024][DEBUG]: DevTools WebSocket Response: Browser.setWindowBounds (id=39) browser {
}
[1543884498.124][DEBUG]: DevTools WebSocket Command: Browser.getWindowBounds (id=40) browser {
"windowId": 1
}
[1543884498.125][DEBUG]: DevTools WebSocket Response: Browser.getWindowBounds (id=40) browser {
"bounds": {
"height": 600,
"left": 0,
"top": 0,
"width": 800,
"windowState": "minimized"
}
}
,
Dec 5
,
Jan 16
(6 days ago)
Friendly ping... |
|||||
►
Sign in to add a comment |
|||||
Comment 1 by paulir...@chromium.org
, Nov 26Components: -Platform>DevTools Platform>DevTools>Mobile
Owner: thomasanderson@chromium.org
Summary: Unable to restore a minimized window through DevTools protocol on Linux (was: Unable to restore a minimized window through DevTools on Linux)