From 8a63fc8ed33eaf8fcba9b822483302202759fa6a Mon Sep 17 00:00:00 2001 From: Benoit Jehanno Date: Mon, 2 Jan 2023 11:40:18 +0100 Subject: [PATCH] Fix css selector that changed on SO side --- src/index.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/index.ts b/src/index.ts index cc7315d..88dbceb 100644 --- a/src/index.ts +++ b/src/index.ts @@ -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()); @@ -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(