Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save corradin/8cda8c553100e721c6b12a7ad4e83b7e to your computer and use it in GitHub Desktop.
Save corradin/8cda8c553100e721c6b12a7ad4e83b7e to your computer and use it in GitHub Desktop.
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