Do you know that most things that you can do manually in the browser can be done using Puppeteer? It is a Node.js library which provides a high-level API. It has quickly become the De Facto choice for all headless browsing projects and today we going to share some Puppeteer hacks with you.
Puppeteer is a Node library which provides a high-level API to control Chrome or Chromium over the DevTools Protocol. Its main advantage is that it removes the need to interact with Chrome DevTools directly, and it provides a high-level API compared to other headless browsers like PhantomJS and CasperJS. You can literally be up and running with something useful in 15 minutes!
- Heavy sites can benefit from adding a headless browser and utilizing server-side rendering of dynamic pages. Puppeteer makes the implementation of this very trivial.
- The screenshot functionality of Puppeteer is probably one of the more common features you stumble upon in tutorials and various examples, but this simple functionality can really be a lifesaver in certain cases.
- Where Puppeteer really shines is testing. Obviously, one can actually create scripts to do specific manipulations of elements, filling forms and testing for specific issues. But there is quite a bit more.
Adding Puppeteer into the mix can provide you with a lot of the functionality of dedicated UI testing tools. Enjoy it and find more hacks here.
Go briefly through the main important things about Marble.js, a functional reactive HTTP framework on top of Node.js.