From 90af31a2106046c06b409cbe65669e9f49d0dfc3 Mon Sep 17 00:00:00 2001 From: Ralf Vogler Date: Thu, 18 Aug 2022 16:57:25 +0200 Subject: [PATCH] epic-games: don't click on 'play free now' button, but only 'free now' --- epic-games.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epic-games.js b/epic-games.js index 27a6dd5..07ed9c5 100644 --- a/epic-games.js +++ b/epic-games.js @@ -58,7 +58,7 @@ try { } console.log('Signed in.'); // click on each banner with 'Free Now'. TODO just extract the URLs and go to them in the loop - const game_sel = 'a:has-text("Free Now")'; + const game_sel = 'span:text-is("Free Now")'; 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 = run.n = await page.locator(game_sel).count();