When comparing NW.js (w/xvfb) vs Puppeteer, the Slant community recommends Puppeteer for most people. In the question“What are the best headless browsers for testing?” Puppeteer is ranked 2nd while NW.js (w/xvfb) is ranked 3rd.
Ranked in these QuestionsQuestion Ranking
Pro Node integration
The integration of Node with the DOM in NW.js opens up a number of new options in how your headless testing workflow can be facilitated.
Pro NaCl support/integration
Access to the Native Client offers up more options in implementing your testing workflow.
Pro Actively developed and promoted by Google
Pro Runs a real browser
Unlike the other options here, this is a real browser, just without the GUI parts. This means the quality of the test is much higher, and lets you do things like save to PDF or images.
Pro Works great with modern node.js features
Pro Complete API for Chromium included
Chromium tests depend on the same API that Puppeteer gives you access to, so all the features are included
Con xvfb Requirement (for now)
Headless is on the NW.js roadmap, but for now xvfb is necessary to get going. The community has done the work and you can find the details here.
Con Not good for Cross Browser Tests
Since it only tests via Chromium, it won't help you test inconsistencies between browsers like Edge or Safari. There are projects to get around this, but they aren't mature.