M
Size: a a a
M
P
M
P
P
M
M
BO
M
M
BO
M
P
P
js
const assert = require('assert');
const { test } = require('@playwright/test');
test.use({
storageState: async ({ }, use) => {
await use({ cookies: [{ name: "foo", value: "bar", domain: "playwright.dev", path: "/" }] });
}
});
test('test', async ({ page, context }) => {
await page.goto('https://playwright.dev/');
const cookies = await context.cookies(['https://playwright.dev/'])
assert.equal(cookies.length, 1)
assert.equal(cookies[0].value, 'bar')
});
P
BO
M
OK
OK
P