How to hide Firefox window (Selenium WebDriver)?

前端 未结 14 886
执念已碎
执念已碎 2020-11-27 11:08

When I execute multiple test simultaneously, i don\'t want to keep Firefox browser window visible.. I can minimize it using selenium.minimizeWindow() but I don\

14条回答
  •  無奈伤痛
    2020-11-27 11:41

    If you are using KDE Desktop, you can make Firefox Windows to be initially opened being minimized. That made my day to me regarding this problem. Just do the following:

    1. Open Firefox
    2. Click on the Firefox icon on the top left corner of the menu bar -> Advanced -> Special Application Settings...
    3. Go to the "Size & Position" tab.
    4. Click on "Minimized" and choose "Apply Initially" (YES).

    These settings will apply for new Firefox windows from now on and you will not be bothered with pop-ups anymore when running tests with Webdriver.

提交回复
热议问题