Skip to content

Instantly share code, notes, and snippets.

View arowla's full-sized avatar

Alison Rowland arowla

  • Stitch Fix
  • Chicagoland, USA
View GitHub Profile
@mgaitan
mgaitan / README.md
Created May 29, 2024 23:43
Playwright-pytest login just once per session (sharing storage state)

Simplest way to use Playwright sharing the "state" among tests.

The first test won't have the storage file so it will get a new empty page with no context and set it up / login.

Further tests will get a Page instance injected that has the same context as the first one, reusing the signed-in state.

Check https://playwright.dev/python/docs/auth#reusing-signed-in-state