Support resize_page when browser window is maximized/fullscreen
Is your feature request related to a problem? Please describe.
Problem:
Currently, resize_page fails when the browser window is maximized or in full-screen mode with the error:
Protocol error (Browser.setContentsSize): Restore window to normal state before setting content size
Expected Behavior:
resize_page should work regardless of the browser window state, similar to how Chrome DevTools "Toggle device toolbar" feature allows dimension changes even when the browser is maximized.
Describe the solution you'd like
Could the tool automatically handle window state restoration before resizing, or provide an option to simulate viewport resizing (like DevTools device emulation) instead of actual window resizing?
Describe alternatives you've considered
provide an option to simulate viewport resizing (like DevTools device emulation) instead of actual window resizing
Additional context
No response
Thanks, yeah, I think we should automatically unmaximize the window to resize it. The emulation for devices is tracked in separate feature requests.
Is there any workaround available?