This forked example has been updated with the recent npm modules. Its fully working.
Create empty folder and install the following modules
npm i nightwatch
npm i node-resemble-js
http://nightwatchjs.org/guide#installation
If you are encountering any issues with canvas; follow this [guide] (https://github.com/Automattic/node-canvas/wiki/Installation---Windows)
- copy
assertions-compareScreenshot.js
to./assertions/compareScreenshot.js
- copy
commands-compareScreenshot.js
to./commands/compareScreenshot.js
- copy
mytest.js
to.tests/mytest.js
- copy sample
nightwatch.json
to project root directory
nightwatch --test tests/mytest.js
I'll try to simpify the code and add new functionalities to it. Thanks to richard-flosi for the original script.
Sweet 👍