There's a misconception when developing browser automation with Selenium, where maximizing the window makes sense on your local UI-enabled machine, but once that's deployed under our Linux cloud container it doesn't make sense and calling Maximize Browser Window won't know to which size to enlarge since there's no known resolution in a headless environment. (Stackoverflow context)
A couple of improvements can be added:
Issue a warning when trying to maximize under a headless scenario. (and eventually disable the command if not forced through a parameter)
Log/docs-driven recommendation on using Set Window Size in such scenarios. (if the default 1440x900 is not enough)
There's a misconception when developing browser automation with
Selenium
, where maximizing the window makes sense on your local UI-enabled machine, but once that's deployed under our Linux cloud container it doesn't make sense and calling Maximize Browser Window won't know to which size to enlarge since there's no known resolution in a headless environment. (Stackoverflow context)A couple of improvements can be added: