Not sure why that would happen in Win10Windows 10 (same thing works for me) but couple.
Couple of things you could try, depending on what you need:
- Add width and height options to the Firefox initialisation set to the screen resolution you need it to open as.
- Also run it headless with those dimensions set (as do you need to see the browser if it's running in the background?)
System.setProperty("webdriver.gecko.driver", locationFirefoxDriver);
FirefoxBinary firefoxBinary = new FirefoxBinary();
firefoxBinary.addCommandLineOptions("--headless");
FirefoxOptions firefoxOptions = new FirefoxOptions();
firefoxOptions.addArguments("--width=1920");
firefoxOptions.addArguments("--height=1080");
firefoxOptions.setBinary(firefoxBinary);
driver = new FirefoxDriver(firefoxOptions);
Although I can understand not bothering with Headless and Firefox. With Chrome you get about 30% speed improvement,. Firefox, I'm not sure it's even 3%.