How can I set the browser window size when using `google-chrome –headless`?
I found it. Simply pass the –window-size command line argument to Google Chrome, for example –window-size=1920,1080. In a Protractor configuration this would look like this: capabilities: { browserName: ‘chrome’, chromeOptions: { args: [‘headless’, ‘window-size=1920,1080’] } } The cool thing is that the windows size is not limited to the current display. It is truly headless, … Read more