How to set default browser window size in Protractor/WebdriverJS

前端 未结 8 1971
广开言路
广开言路 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:17

    Add the below code. This will maximize the browser window.

    browser.driver.manage().window().maximize();
    

提交回复
热议问题