Getting started with Puppeteer
As explained in Chapter 3, Top Web Test Automation Frameworks, to get started with the Puppeteer framework, you need to install the node package through the following command line:
npm install puppeteer
Once the preceding package, together with its dependencies, is installed, you are ready to start writing and running your first test locally in either Headed or Headless mode.
To see the full documentation of the Puppeteer framework along with code samples, API descriptions, release notes, and more, please see https://pptr.dev/.
Like the Playwright framework, Puppeteer also drives its automation through the Browser object, which then drills down into the multiple browserContext sessions that can operate on multiple pages, extensions (https://pptr.dev/#?product=Puppeteer&version=v13.1.0&show=api-working-with-chrome-extensions), and frames.