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

8 Replies, 1263 Views

Hey! Puppeteer interact with extension is a bit of a rabbit hole, but it’s doable. I’ve used the `--load-extension` flag to load my extension and then used `page.goto()` to open the popup.

For clicking buttons, you can use `page.click()` or `page.evaluate()` to simulate user actions. It’s not super straightforward, but it works.

Also, this tool called [CRX Viewer](https://robwu.nl/crxviewer/) is great for debugging extensions. It lets you inspect the extension’s files and see what’s going on. Hope this helps!

Messages In This Thread



Users browsing this thread: 1 Guest(s)