mozilla / geckodriver

WebDriver for Firefox
https://firefox-source-docs.mozilla.org/testing/geckodriver/
Mozilla Public License 2.0
7.2k stars 1.53k forks source link

How to open firefox browser in maximize form using browser options #2195

Closed EnigmaSaikat closed 2 months ago

EnigmaSaikat commented 3 months ago

System

Testcase

options.addArguments("--start-maximized"); :not maximizing the firefox browser like this

image

Instead, it is opening like this

image

for options.addArguments("--kiosk");

image

whimboo commented 2 months ago

There is no such --start-maximized command line argument for Firefox. You could use --window-size and specifying a fixed width and height like --window-size 1280x1024. Otherwise let geckodriver start Firefox as normal and then run the Maximize Window command to switch to maximize mode.