Skip to content

nbaldzhiev/playwright-chromium-iframe-storage-state-bug

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Repo to reproduce Playwright issue #32230

To reproduce:

  1. clone the repository
  2. install the project (npm install and npx playwright install)
  3. debug test in tests/foo.spec.ts with a breakpoint at await page.pause()
  4. open the browser's devtools and navigate to the Local Storage section
  5. 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()

Local storage item missing in Chromium Local storage item missing in Chromium

Local storage item present in Firefox Local storage item present in Firefox