eg: add click delay, fixes #75
Playwright triggered the click such that the purchase frame opened, but did not resolve the promise. Had to move mouse into the browser for it to continue. Adding a click delay of 1ms also worked (default is no delay between mouse down and up). Went for 11ms. A typical click is probably 100-200ms.
This commit is contained in:
parent
0d2ff0c8a9
commit
944cca6715
1 changed files with 1 additions and 1 deletions
|
|
@ -133,7 +133,7 @@ try {
|
|||
if (db.data[user][game_id].status == 'failed') db.data[user][game_id].status = 'manual'; // was failed but now it's claimed
|
||||
} else { // GET
|
||||
console.log(' Not in library yet! Click GET.');
|
||||
await page.click('[data-testid="purchase-cta-button"]');
|
||||
await page.click('[data-testid="purchase-cta-button"]', { delay: 11 }); // got stuck here without delay (or mouse move), see #75, 1ms was also enough
|
||||
|
||||
// click Continue if 'Device not supported. This product is not compatible with your current device.' - avoided by Windows userAgent?
|
||||
page.click('button:has-text("Continue")').catch(_ => { }); // needed since change from Chromium to Firefox?
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue