playwright-auth-utils
v1.0.1
Published
This module exports AuthUtils with two capabilities: saving a session and injecting a session into a page.
Downloads
3
Readme
Playwright auth utils
This module exports AuthUtils with two capabilities: saving a session and injecting a session into a page.
Example
import { AuthUtils } from 'playwright-auth-utils';
test('example', async ({ page, browser }) => {
const pathToFileSession = "path/file.json"
await page.goto('https://playwright.dev/');
await AuthUtils.setSession(page, pathToFileSession)
const authenticatedPage = await AuthUtils.getAuthenticatedPage(browser, pathToFileSession)
});