eg: wait for "Place Order" button to not be loading, fixes #84
This commit is contained in:
parent
b75f538d8a
commit
b7d5d43078
1 changed files with 2 additions and 2 deletions
|
|
@ -168,8 +168,8 @@ try {
|
||||||
if (cfg.debug) await page.pause();
|
if (cfg.debug) await page.pause();
|
||||||
if (cfg.dryrun) continue;
|
if (cfg.dryrun) continue;
|
||||||
|
|
||||||
await page.waitForTimeout(2000);
|
// 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")').click({ delay: 11 });
|
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
|
// 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")');
|
const btnAgree = iframe.locator('button:has-text("I Agree")');
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue