From d9ad9785144142e7c42a0ac7580483c68c09952b Mon Sep 17 00:00:00 2001 From: XEGARE Date: Thu, 10 Feb 2022 23:26:48 +0500 Subject: [PATCH] Find payment button --- epic-games.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epic-games.js b/epic-games.js index 943741a..a07bdf3 100644 --- a/epic-games.js +++ b/epic-games.js @@ -109,7 +109,7 @@ const TIMEOUT = 20 * 1000; // 20s, default is 30s // it then creates an iframe for the rest // await page.frame({ url: /.*store\/purchase.*/ }).click('button:has-text("Place Order")'); // not found because it does not wait for iframe const iframe = page.frameLocator('#webPurchaseContainer iframe') - await iframe.locator('button:has-text("Place Order")').click(); + await iframe.locator('button[class~="payment-btn"]').click(); // await page.pause(); await iframe.locator('button:has-text("I Agree")').click(); // This is true even when there is no captcha challenge shown! That was the reason why old.stealth.js worked - it did not have this check... TODO check for hcaptcha