How to set default browser window size in Protractor/WebdriverJS

前端 未结 8 1997
广开言路
广开言路 2020-11-27 15:14

For some reason when I run my tests at work the browser is maximized, but when I run them at home it only opens a browser window of about 50% width. This causes some discrep

8条回答
  •  天命终不由人
    2020-11-27 16:06

    In Selenium 4 (Protractor 6), setRect replaces setSize and setPosition

    For example,

    browser.driver.manage().window().setRect({height: 600, width: 800});
    

提交回复
热议问题