How to set browser viewport size

后端 未结 3 2147
野趣味
野趣味 2021-02-20 13:29

I\'m trying to create a cross-browser Python-Selenium test script. So I need all results to be same no matter which webdriver (Chrome or <

3条回答
  •  我寻月下人不归
    2021-02-20 14:15

    I'm using this:

    driver.manage().window().setSize(new org.openqa.selenium.Dimension(1900, 990));
    

    Where 1900 is the width, and 990 is the height.

提交回复
热议问题