zinserjan / wdio-visual-regression-service

Visual regression service for WebdriverIO.
MIT License
102 stars 39 forks source link

Safari screenshots generated when using Chrome with --headless #81

Open yebrahim opened 6 years ago

yebrahim commented 6 years ago

I'm running visual regression tests with the following section in my wdio.config.js:

  capabilities: [{
    maxInstances: 5,
    browserName: 'chrome',
    chromeOptions: {
      args: headless ? ['--headless', '--disable-gpu', '--window-size=1024,800'] : [],
    },
  }],

If and only if headless is true, adding the argument to the Chrome process, screenshots get generated for both Chrome and Safari.

tnypxl commented 6 years ago

I have the same issue. For some reason context.browser.name returns Safari 7.0 when you use the headless flag with chrome.

shwetaneelsharma commented 6 years ago

Yes, I too am having this issue. Screenshots get appended with Safari.

zinserjan commented 6 years ago

See bestiejs/platform.js#145. Until this gets merged and released you could use the browser name of capabilities as a workaround.