After maximizing the window by driver.manage().window().maximize();
, how do I minimize the browser window in Selenium WebDriver with Java?
There seems to be a minimize function now:
From the documentation on:
this.minimize() → Promise
Minimizes the current window. The exact behavior of this command is specific to individual window managers, but typicallly involves hiding the window in the system tray.
Parameters
None.
Returns
Promise
A promise that will be resolved when the command has completed.
So the code should be:
webdriver.manage().window().minimize()
At least in JavaScript.