This is a complete example on how to test a chrome extension with Puppeteer. This repo is referenced in our blog. In this repo you can find:
- A simple chrome extension under replacer-chrome-extension.
- A simple React app under src.
- Puppeteer e2e tests under e2e.
Requirements: Node >=20 and Chromium (even tough you're going to install Puppeteer make sure you have chromium - https://www.chromium.org/getting-involved/download-chromium/).
- npm installto install the dependencies.
- npm startto run the react app, must be running since it is the base for the e2e tests.
- npm run e2eto run the e2e tests.

