简体   繁体   中英

How to maximize chrome browser using intern leadfoot

I am having hard time maximizing chrome browser using theintern/leadfoot command maximize.

I tried maximize window .maximizeWindow() (it works for firefox but not for chrome browser. I even tried execute("window.resizeTo(14400, 8130);") and setWindowSize("", 1440, 813);

Has any one tried a different approach?

You can add Chrome commandline argument --start-maximized , you can pass it in chromeOptions

{
    browserName: 'chrome',
    chromeOptions: {
        args: [
            'start-maximized'
        ]
    }
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM