This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const pw = require('playwright'); | |
(async () => { | |
const browser = await pw.chromium.launch(); | |
const context = await browser.newContext(); | |
// set addInitScript to run this on every page load in this context | |
// in the app, use window.IS_PLAYWRIGHT to set window.store = store; | |
await context.addInitScript('window.IS_PLAYWRIGHT = true;') |