Problem
The window tool currently supports list, switch, switch_latest, and close actions, but has no way to maximize, minimize, fullscreen, or resize/reposition the browser window. This is important because many web applications use responsive design — elements render differently depending on window size, and automation tests typically run maximized.
Current workarounds
- Chrome/Edge: Pass
--start-maximized as a browser argument to start_browser
- Firefox:
--start-maximized doesn't work. Must use -width/-height args with screen dimensions (requires a two-pass approach: launch → measure screen.availWidth/screen.availHeight → close → relaunch with measured values)
- Safari: No workaround available
- JavaScript approaches (
window.resizeTo(), requestFullscreen(), F11 key press) all fail — they are silently ignored or rejected by browsers on main windows
These workarounds are browser-specific, fragile, and cannot achieve a true OS-level maximize on all browsers.
Proposed solution
Add new actions to the existing window tool:
| Action |
W3C WebDriver Endpoint |
Selenium API |
maximize |
POST /session/{id}/window/maximize |
driver.manage().window().maximize() |
minimize |
POST /session/{id}/window/minimize |
driver.manage().window().minimize() |
fullscreen |
POST /session/{id}/window/fullscreen |
driver.manage().window().fullscreen() |
setRect |
POST /session/{id}/window/rect |
driver.manage().window().setRect({x, y, width, height}) |
All four are standard W3C WebDriver commands supported cross-browser. The server already has access to the driver object (e.g., cookie tools use driver.manage()), so the implementation would be straightforward — just map the new action values to the corresponding driver.manage().window() calls.
maximize alone would solve the most common need, but setRect would cover arbitrary resize/reposition, and minimize/fullscreen would round out the full W3C window management API.
Problem
The
windowtool currently supportslist,switch,switch_latest, andcloseactions, but has no way to maximize, minimize, fullscreen, or resize/reposition the browser window. This is important because many web applications use responsive design — elements render differently depending on window size, and automation tests typically run maximized.Current workarounds
--start-maximizedas a browser argument tostart_browser--start-maximizeddoesn't work. Must use-width/-heightargs with screen dimensions (requires a two-pass approach: launch → measurescreen.availWidth/screen.availHeight→ close → relaunch with measured values)window.resizeTo(),requestFullscreen(),F11key press) all fail — they are silently ignored or rejected by browsers on main windowsThese workarounds are browser-specific, fragile, and cannot achieve a true OS-level maximize on all browsers.
Proposed solution
Add new actions to the existing
windowtool:maximizePOST /session/{id}/window/maximizedriver.manage().window().maximize()minimizePOST /session/{id}/window/minimizedriver.manage().window().minimize()fullscreenPOST /session/{id}/window/fullscreendriver.manage().window().fullscreen()setRectPOST /session/{id}/window/rectdriver.manage().window().setRect({x, y, width, height})All four are standard W3C WebDriver commands supported cross-browser. The server already has access to the
driverobject (e.g., cookie tools usedriver.manage()), so the implementation would be straightforward — just map the new action values to the correspondingdriver.manage().window()calls.maximizealone would solve the most common need, butsetRectwould cover arbitrary resize/reposition, andminimize/fullscreenwould round out the full W3C window management API.