Currently, I'm running Selenium v4
locally on a normal PC with a graphics card and monitor. However, in production, I plan on running Selenium on a server that does not have a monitor.
When I call: driver.maximize()
it maximizes the browser the the same height as the monitor/display. What behavior can I expect in production when the server does not have a display/monitor? How big will it maximize the window?
Update
I know you could run Selenium in headless mode but this is not my question. My question is how does Selenium/WebDriver maximize the size of the browser in this case, when it normally uses the size of the monitor/display to do so? What reference point is it using?
From the Resizing and positioning windows section of the WebDriver specification:
In short, executing Selenium based tests on a server that does not have a monitor using
driver.maximize()
, the command invokes the window manager-specific maximize operation, if any, on the window containing the current top-level browsing context. This typically increases the window to the maximum available size without going full-screen.