From fd3f947223733b187c5e1903be1209f8fd3b618c Mon Sep 17 00:00:00 2001 From: Ralf Vogler Date: Thu, 6 Jan 2022 17:26:24 +0100 Subject: [PATCH] debug output --- main.stealth.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main.stealth.js b/main.stealth.js index 5d318d9..1e67677 100644 --- a/main.stealth.js +++ b/main.stealth.js @@ -86,7 +86,7 @@ const newStealthContext = async (browser, contextOptions = {}) => { await page.waitForSelector(game_sel); // const games = await page.$$(game_sel); // 'Element is not attached to the DOM' after navigation; had `for (const game of games) { await game.click(); ... } const n = await page.locator(game_sel).count(); - console.log(n); + console.log('Number of free games:', n); for (let i=1; i<=n; i++) { await page.click(`:nth-match(${game_sel}, ${i})`); const title = await page.locator('h1 div').first().innerText(); @@ -122,6 +122,7 @@ const newStealthContext = async (browser, contextOptions = {}) => { // process.exit(1); // } await page.waitForSelector('text=Thank you for buying'); + console.log('Claimed successfully!'); await page.pause(); } if (i