Tools: Look into supporting headless chrome

Created on 8 Sep 2017  路  8Comments  路  Source: Polymer/tools

Could be useful for filesystem watching based fast-feedback workflows.

web-component-tester Medium Available Enhancement

Most helpful comment

headless works for both Chrome 59+ and Firefox 56+ now. Use below config in wct.conf.json

{
  "verbose": false,
  "plugins": {
    "local": {
      "disabled": false,
      "browsers": ["chrome", "firefox"],
      "browserOptions": {
        "chrome": ["window-size=1920,1080", "headless", "disable-gpu"],
        "firefox": ["--headless"]
      }
    }
  }
}

All 8 comments

This might also simplify running a WCT test on travis, since you wouldn't need to start an X server for Chrome.

:sweat_smile: Was digging into this today, guess I should have started here!

Any progress on this? It would save a lot of execution time

Is there support for any headless browser?

headless works for both Chrome 59+ and Firefox 56+ now. Use below config in wct.conf.json

{
  "verbose": false,
  "plugins": {
    "local": {
      "disabled": false,
      "browsers": ["chrome", "firefox"],
      "browserOptions": {
        "chrome": ["window-size=1920,1080", "headless", "disable-gpu"],
        "firefox": ["--headless"]
      }
    }
  }
}

NOTE: if using Headless Chrome with Travis containerized (sudo: false) you will need the flag no-sandbox
NOTE: window-size is not specifically needed.

{
  "plugins": {
    "local": {
      "browserOptions": {
        "chrome": ["headless", "disable-gpu", "no-sandbox"],
        "firefox": ["--headless"]
      }
    }
  }
}

@usergenic @azakus Can this be closed now?

Oh yeah that's a good point. Thanks, @stramel :)

Was this page helpful?
0 / 5 - 0 ratings