From a0de165e6f86ec8a48ce2c052dca3d148bfcf079 Mon Sep 17 00:00:00 2001 From: Ralf Vogler Date: Fri, 6 May 2022 00:07:48 +0200 Subject: [PATCH] :has-text("Continue") -> button:has-text("Continue") --- epic-games.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/epic-games.js b/epic-games.js index 214ba93..1e165c7 100644 --- a/epic-games.js +++ b/epic-games.js @@ -74,8 +74,8 @@ for (let i = 1; i <= n; i++) { console.log('Not in library yet! Click GET.') await page.click('[data-testid="purchase-cta-button"]'); // click Continue if 'Device not supported. This product is not compatible with your current device.' - await Promise.any([':has-text("Continue")', '#webPurchaseContainer iframe'].map(s => page.waitForSelector(s))); // wait for Continue xor iframe - if (await page.locator(':has-text("Continue")').count() > 0) { + await Promise.any(['button:has-text("Continue")', '#webPurchaseContainer iframe'].map(s => page.waitForSelector(s))); // wait for Continue xor iframe + if (await page.locator('button:has-text("Continue")').count() > 0) { // console.log('Device not supported. This product is not compatible with your current device.'); await page.click('button:has-text("Continue")'); }