Getting started with the Google Puppeteer framework
Puppeteer is an open source node library and a framework developed by Google that is based on the CDP. It allows web application developers to control headless or headed chrome browsers through high-level APIs over the above mentioned CDP or DevTools protocol (https://chromedevtools.github.io/devtools-protocol/). As described earlier in this chapter, Puppeteer and Playwright share the same architecture and CDP to create and run tests.
Unlike Selenium and Cypress, Puppeteer only supports Chrome and Chromium-based browsers, which means that testing end-to-end across all other browsers, such as WebKit Safari and Mozilla Firefox, isn't supported.
Among the core capabilities of Puppeteer is the generation of screenshots and PDFs of websites' pages, crawling a single-page application, and generating pre-rendered content, automating form submission, UI testing, and user gestures such as keyboard inputs. With the support of...