
Headless Tests in Nightwatch JS
The Nightwatch documentation unfortunately does not cover how to run your tests in a headless mode so I thought it would be worth writing a small post about it. For those of you that are not familiar with the term ‘headless’ it simply means running a automated browser window that does not physically appear anywhere on your machine.
To enable headless this headless mode you’ll want to add ”headless”
to your ”chromeOptions”
like so:
gist:waltir/c5ca2a9d68e0a4a07629592c8152916e
That’s all it takes to initiate a headless mode in Nightwatch. Hopefully this is able to help some of my fellow Nightwatch users out.
More Posts
Blocking Ad Traffic In Nightwatch JS

Example showing how you can block unwanted ad traffic in your Nightwatch JS tests....
Blocking Ad Traffic In Cypress

Example showing how you can block unwanted ad traffic in your Cypress tests....
Three Ways To Resize The Browser In Nightwatch

Outlining the three different ways to resize the browser in Nightwatch JS with examples....
Happy Path VS Sad Path Testing

As a test engineer it is crucial that both happy path and sad path use cases have been considered and fully tested...