When executing UI tests, I get an error that selenium doesn't support automatic window resizing for chromedriver, which results in tests failing.
Is there a way to set this using chrome-options for headless-chrome
?
I have tried the following,
ChromeOptions options = new ChromeOptions();
options.addArguments("--start-maximized");
Also, replacing "--start-maximized"
with "--start-fullscreen"
and "--kiosk"
.
But none of the above worked for me, the only option that works for me is "--window-size=width,height"
.
I do not want to hard-code values for width and height, is there some way I can do this to set fullscreen ?