Last active
April 7, 2023 11:26
-
-
Save corradin/8cda8c553100e721c6b12a7ad4e83b7e to your computer and use it in GitHub Desktop.
This file contains 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
import { test as setup } from '@playwright/test'; | |
import { storageStatePath } from './playwright.config'; | |
const username = process.env.MEETUP_USERNAME ?? ''; | |
const password = process.env.MEETUP_PASSWORD ?? ''; | |
setup('Login a user', async ({ page }) => { | |
await page.goto('https://www.meetup.com/login'); | |
await page.getByLabel('Email').fill(username); | |
await page.getByLabel('Password', { exact: true }).fill(password); | |
await page.getByRole('button', { name: 'Log in', exact: true }).click(); | |
await page.waitForURL('https://www.meetup.com/home/**'); | |
await page.context().storageState({ | |
path: storageStatePath, | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment