In a multi-monitor display environment, how do I tell Selenium which display to open a new window in?

后端 未结 17 2229
小蘑菇
小蘑菇 2021-01-31 15:53

Sorry if this has been asked and answered. I did a search but came up empty.

17条回答
  •  野趣味
    野趣味 (楼主)
    2021-01-31 16:59

    In case the monitor where you want to open a browser windows is to the left of the monitor with IDE, try negative values. In Java:

    WebDriver driver = new FirefoxDriver();
    driver.manage().window().setPosition(new Point(-1500, 0));
    

提交回复
热议问题