
In a Node. You can opt to make puppeteer run the local installation of Chrome you already have installed by installing puppeteer-core instead, which is useful in some special cases (see puppeteer vs puppeteer-core). This will download and bundle the latest version of Chromium. Puppeteer is a headless Node library that provides a high level API for controlling Chromium or Chrome over the DevTools protocol. Start by installing it using npm install puppeteer To be precise, it uses Chromium the open source part of Chrome, which mostly means you don’t have the proprietary codecs that are licensed by Google and can’t be open sourced (MP3, AAC, H.264.) and you don’t have the integration with Google services like crash reports, Google update and more, but from a programmatic standpoint it should all be 100% similar to Chrome (except for media playing, as noted). It’s the most precise way to automate testing with Chrome though, since it’s using the actual browser under the hood. Since it spins up a new Chrome instance when it’s initialized, it might not be the most performant. It does not unlock anything new, per se, but it abstracts many of the nitty-gritty details we would have to deal with, without using it. create server-side rendered versions of single page apps.We are basically using Chrome, but programmatically using JavaScript. Puppeteer is a Node library that we can use to control a headless Chrome instance. The following is code for getting a handle to the background page of an extension whose source is located in.

caution Extensions in Chrome/Chromium currently only work in non-headless mode and experimental Chrome headless mode. Introduction to programmatically controlling Chrome from Node.js Chrome Extensions Puppeteer can be used for testing Chrome Extensions.
