Created
January 4, 2022 12:07
-
-
Save james-ni/ccc1b7bba2484c662594127c6983c994 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { test, expect } = require('@playwright/test'); | |
test('basic test', async ({ page }) => { | |
await page.goto('http://localhost:3000'); | |
await page.click('[name=login]'); | |
await page.fill('[name=email]', '<EMAIL>'); | |
await page.fill('[name=password]', '<PASSWORD>'); | |
await page.click('[name=submit]'); | |
await page.waitForLoadState('networkidle'); | |
const access_token = await page.evaluate("() => window.localStorage.getItem('access_token')") | |
console.log(access_token) | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment