Skip to content

Instantly share code, notes, and snippets.

@corradin
Last active January 24, 2022 10:43
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/bba590d2549988c84eb6d72136a0e18e to your computer and use it in GitHub Desktop.
Save corradin/bba590d2549988c84eb6d72136a0e18e to your computer and use it in GitHub Desktop.
import { Page } from '@playwright/test';
async function login(
page: Page,
username: string,
password: string,
): Promise<void> {
await page.goto('https://www.meetup.com/login');
await page.locator('id=email').fill(username);
await page.locator('id=current-password').fill(password);
await Promise.all([
page.waitForNavigation(),
page.locator('button[type=submit] >> "Log in"').click(),
]);
}
export default login;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment