Skip to content

Commit

Permalink
Find badge number after logging in
Browse files Browse the repository at this point in the history
  • Loading branch information
connorads committed Feb 18, 2024
1 parent e3c9b43 commit 5278cb1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@ import {
const browser = await playwright['chromium'].launch();
const page = await browser.newPage();

const badgeNo = await getBadgeNumber(page, url);

console.log(`Login to ${url}`);
await page.goto(`${url}users/login`);
console.log('url', page.url());
await page.waitForSelector('#email');
await page.fill('#email', email);
await page.fill('#password', password);
await Promise.all([page.waitForURL('**/'), page.click('#submit-button')]);
await Promise.all([page.waitForURL(url), page.click('#submit-button')]);

const badgeNo = await getBadgeNumber(page, url);

console.log('Go to profile');
console.log('url', page.url());
Expand Down

0 comments on commit 5278cb1

Please sign in to comment.