Merge "WebdriverIO should be able to run Chrome headlessly"
[lhc/web/wiklou.git] / tests / selenium / wdio.conf.js
index 5565bc3..7b74328 100644 (file)
@@ -80,9 +80,10 @@ exports.config = {
                maxInstances: 1,
                //
                browserName: 'chrome',
-               // Since Chrome v57 https://bugs.chromium.org/p/chromedriver/issues/detail?id=1625
                chromeOptions: {
-                       args: [ '--enable-automation' ]
+                       // Run headless when there is no DISPLAY
+                       // --headless: since Chrome 59 https://chromium.googlesource.com/chromium/src/+/59.0.3030.0/headless/README.md
+                       args: process.env.DISPLAY ? [] : [ '--headless' ]
                }
        } ],
        //