Export cookies as a Playwright storageState file.
Sign in by hand once — OTP, 2FA and all — then reuse that session in every test. JarFlip writes the file; Playwright loads it.
Export
- Sign in to your app as the user you want to test with.
- Open JarFlip, press the Export button and choose Playwright storageState. Pick This site, A jar or Selected cookies.
- Save the file — for example
jars/admin.json. Repeat for each role.
Use it in a test
import { test, expect } from '@playwright/test';
test.use({ storageState: 'jars/admin.json' });
test('admin sees the audit log', async ({ page }) => {
await page.goto('/settings/audit');
await expect(page.getByRole('table')).toBeVisible();
});Or set it once for a whole project in playwright.config.ts:
projects: [
{ name: 'admin', use: { storageState: 'jars/admin.json' } },
{ name: 'free', use: { storageState: 'jars/free.json' } },
],What the file contains
A standard Playwright storageState: a cookies array with name, value, domain, path, expires (-1 for session cookies), httpOnly, secure and sameSite. Partitioned cookies carry their partitionKey. The origins list is empty because cookies are all JarFlip exports.
Treat it like a password. The file holds live session cookies. Add jars/ to .gitignore, and re-export when the session expires.
Questions
Where do the cookies for a different role come from?+
Save one jar per role (Admin, Free user, Paid). Flip to a jar, then export — or export a jar straight from the side panel’s Jars tab or the dashboard. Each export is its own storageState file.
Do exported files contain real sessions?+
Yes, and they work until the site expires them. Keep them out of version control (add them to .gitignore) and use accounts you can afford to rotate.
Does it include localStorage?+
No. JarFlip exports cookies; the storageState “origins” list is left empty.