dwyl / learn-nightwatch

:last_quarter_moon_with_face: Learn how to use Nightwatch.js to easily & automatically test your web apps in *real* web browsers.
584 stars 214 forks source link

How to run Chrome headless? #90

Closed lolpez closed 4 years ago

lolpez commented 6 years ago

Following the configuration file:

`"test_settings": {

"default": {
    "screenshots": {
        "enabled": true, // if you want to keep screenshots
        "path": SCREENSHOT_PATH, // save screenshots here
        "on_failure": true,
        "on_error": true
    },
    "globals": {
        "waitForConditionTimeout": 5000 // sometimes internet is slow so wait.
    },
    "desiredCapabilities": { // use Chrome as the default browser for tests
        "browserName": "chrome"
    }
},
"chrome": {
    "desiredCapabilities": {
        "browserName": "chrome",
        "javascriptEnabled": true, // turn off to test progressive enhancement
        "chromeOptions" : {
            "args": ["headless"]
        }
    }
}

}`

Chrome window still opens. I've found the list of arguments here but no results. How can I use the Chrome driver in headless mode using nightwatch for Windows 10?

nelsonic commented 6 years ago

@lolpez I suggest you open this question on: https://github.com/nightwatchjs/nightwatch/issues