prime-gaming: button text changed from Games to Prime Day -> use [data-type="Game"] instead
This commit is contained in:
parent
6c190c1f60
commit
70b2b0d105
1 changed files with 2 additions and 2 deletions
|
|
@ -49,7 +49,7 @@ while (await page.locator('button:has-text("Sign in")').count() > 0) {
|
||||||
if (!debug) context.setDefaultTimeout(TIMEOUT);
|
if (!debug) context.setDefaultTimeout(TIMEOUT);
|
||||||
}
|
}
|
||||||
console.log('Signed in.');
|
console.log('Signed in.');
|
||||||
await page.click('button:has-text("Games")');
|
await page.click('button[data-type="Game"]');
|
||||||
const games_sel = 'div[data-a-target="offer-list-FGWP_FULL"]';
|
const games_sel = 'div[data-a-target="offer-list-FGWP_FULL"]';
|
||||||
await page.waitForSelector(games_sel);
|
await page.waitForSelector(games_sel);
|
||||||
console.log('Number of already claimed games (total):', await page.locator(`${games_sel} p:has-text("Collected")`).count());
|
console.log('Number of already claimed games (total):', await page.locator(`${games_sel} p:has-text("Collected")`).count());
|
||||||
|
|
@ -100,7 +100,7 @@ for (const card of games) {
|
||||||
}
|
}
|
||||||
// await page.pause();
|
// await page.pause();
|
||||||
await page.goto(URL_CLAIM, {waitUntil: 'domcontentloaded'});
|
await page.goto(URL_CLAIM, {waitUntil: 'domcontentloaded'});
|
||||||
await page.click('button:has-text("Games")');
|
await page.click('button[data-type="Game"]');
|
||||||
} while (n);
|
} while (n);
|
||||||
}
|
}
|
||||||
await context.close();
|
await context.close();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue