Rayrun
← Back to Discord Forum

Mocking chrome.storage.sync APIs w/ Chrome Extensions

When testing Chrome Extensions with chromium, is it possible to mock or access the Chrome storage APIs, specifically chrome.storage.sync? My chrome ext. accesses this storage for things like API host, keys, etc and I would like to either mock that data, or pre-set it before the test runs. Thanks in advance

This thread is trying to answer question "Is it possible to mock or access the Chrome storage APIs, specifically chrome.storage.sync, when testing Chrome Extensions with chromium?"

1 reply
refactoreric

Hi, I think these tricks should work: https://playwright.dev/docs/mock-browser-apis

Related Discord Threads

TwitterGitHubLinkedIn
AboutQuestionsDiscord ForumBrowser ExtensionTagsQA Jobs

Rayrun is a community for QA engineers. I am constantly looking for new ways to add value to people learning Playwright and other browser automation frameworks. If you have feedback, email luc@ray.run.