I have a chrome extension which I'd like to E2E test (simulate some basic user interactions).
Using Cypress, I was able to load my app but couldn't interact with it (i.e. go to the app url using the chrome-extension://
protocol).
Then I found out that Cypress (like many others testing frameworks) is not able to approach the chrome://
protcol, yet, as far as I get it, I need the chrome.runtime api
to be included somehow for my app to behave as expected (e.g. interact with background page or use the local storage) and that can't be achived by simply clicking my popup.html
file on the other hand.
I feel like I'm missing something here. How should I test my Chrome extension with ease? There must be some good practice for it, launching and treat it like a usual webpage.
Thanks
OK.
So after countless tryouts I've came to a conclusion that the best testing platform for browser extensions - offering a straight-forward way to load the extension (and also use the chrome://
protocol) is indeed - puppeteer (tried cypress and selenium as well)