To reproduce:
- clone the repository
- install the project (
npm install
andnpx playwright install
) - debug test in
tests/foo.spec.ts
with a breakpoint atawait page.pause()
- open the browser's devtools and navigate to the Local Storage section
- select origin
https://clausa.app.carto.com
Result (in Playwright versions >1.37.1
):
- in chromium, the local storage item set in the
newContext
call is missing; - in firefox, the local storage item exists (expected behaviour).
const context = await browser.newContext({
storageState: {
cookies: [],
origins: [{ origin: 'https://clausa.app.carto.com', localStorage: [{ name: 'hello', value: 'world' }]}]
}
})
const page = await context.newPage()