Skip to content

Commit

Permalink
Fix css selector that changed on SO side (#33)
Browse files Browse the repository at this point in the history
  • Loading branch information
beuted authored Jan 2, 2023
1 parent 4e2d940 commit 0237e32
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 @@ -34,7 +34,7 @@ import {

console.log('Go to profile');
console.log('url', page.url());
await Promise.all([page.waitForNavigation(), page.click('.my-profile')]);
await Promise.all([page.waitForNavigation(), page.click('.s-user-card')]);

console.log("Go to user's Fanatic badge page");
console.log('url', page.url());
Expand All @@ -50,9 +50,9 @@ import {

if (!awarded) {
console.log('User does not have Fanatic badge yet so capture progress');
await Promise.all([page.waitForNavigation(), page.click('.my-profile')]);
await Promise.all([page.waitForNavigation(), page.click('.s-user-card')]);
console.log('url', page.url());
await page.click('#badge-card-settings');
await page.click('.js-select-badge-container');
const progressSelector = '[data-badge-database-name="Fanatic"]';
await page.waitForSelector(progressSelector);
const text = await page.evaluate(
Expand Down

0 comments on commit 0237e32

Please sign in to comment.