How can I use Puppeteer to interact with a browser extension? Tips and examples needed!

8 Replies, 1241 Views

Puppeteer interact with extension is a pain, but it’s possible! I’ve used the `puppeteer-extra` package with the `puppeteer-extra-plugin-user-preferences` plugin to load extensions. It’s a bit of a hack, but it works.

For testing the popup, I usually inject some JS to open it and then use Puppeteer’s API to interact with it. It’s not perfect, but it gets the job done.

Also, this article on Dev.to ([Testing Chrome Extensions with Puppeteer](https://dev.to/example)) has some great tips. Good luck!

Messages In This Thread



Users browsing this thread: 1 Guest(s)