diff --git a/epic-games.js b/epic-games.js index cccb083..366bc67 100644 --- a/epic-games.js +++ b/epic-games.js @@ -168,8 +168,8 @@ try { if (cfg.debug) await page.pause(); if (cfg.dryrun) continue; - await page.waitForTimeout(2000); - await iframe.locator('button:has-text("Place Order")').click({ delay: 11 }); + // Playwright clicked before button was ready to handle event, https://github.com/vogler/free-games-claimer/issues/84#issuecomment-1474346591 + await iframe.locator('button:has-text("Place Order"):not(:has(.payment-loading--loading))').click({ delay: 11 }); // I Agree button is only shown for EU accounts! https://github.com/vogler/free-games-claimer/pull/7#issuecomment-1038964872 const btnAgree = iframe.locator('button:has-text("I Agree")');