protractor icon indicating copy to clipboard operation
protractor copied to clipboard

set window size of headless chrome

Open tom94zoe opened this issue 9 years ago • 3 comments

Hi,

It seems like the window-size of a headless chrome couldn't be configured. Some components of my application are only visible if the width is bigger than 960px, but protractor couldn't find them. If I run the test without "--headless"-attribute everything works fine. Does anyone solve this problem?

  • Node Version: 6.10.1
  • Protractor Version: 5.11
  • Angular Version: 1.5.8
  • Browser(s): Chrome
  • Operating System and Version: Ubuntu 16.04
  • Your protractor configuration file:

capabilities{ browserName: 'chrome', chromeOptions:{ args:[ "--headless", "--disable-gpu", "--window-size=1000,1000" ] } }

tom94zoe avatar Apr 03 '17 11:04 tom94zoe

Hi there!

Your question is better suited for StackOverflow or Gitter. Please ask a question there with the 'protractor' tag or post in the Gitter Channel to get help.

From the the getting help section of the README:

Please ask usage and debugging questions on StackOverflow (use the "protractor" tag) or in the Angular discussion group. (Please do not ask support questions here on Github.)

Thanks!

NickTomlin avatar Apr 05 '17 20:04 NickTomlin

Headless mode is cool, but stuff like changing the window size is exactly the sort of thing I'd expect to not work. I'd recommend running with Xvfb for now until --headless is a bit more mature.

heathkit avatar Apr 15 '17 07:04 heathkit

Oh I didn't know that. Thank you

tom94zoe avatar Apr 15 '17 10:04 tom94zoe