通过 driver.manage().window().maximize();
最大化窗口后,如何使用 Java 最小化 Selenium WebDriver 中的浏览器窗口?
最佳答案
好像有minimize function现在:
从文档中:
webdriver.manage().window()
this.minimize() → Promise<undefined>
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<undefined>
A promise that will be resolved when the command has completed.
所以代码应该是:
webdriver.manage().window().minimize()
至少 in JavaScript .
关于selenium - 如何在 Selenium WebDriver 3 中最小化浏览器窗口,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42647058/