:has-text("Continue") -> button:has-text("Continue")
This commit is contained in:
parent
59450ed05c
commit
a0de165e6f
1 changed files with 2 additions and 2 deletions
|
|
@ -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")');
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue