don't log 'Device not supported'

This commit is contained in:
Ralf Vogler 2022-02-24 16:52:50 +01:00
parent 4fc7d65b9b
commit fe7e3d189d

View file

@ -104,7 +104,7 @@ const TIMEOUT = 20 * 1000; // 20s, default is 30s
// @ts-ignore https://caniuse.com/?search=promise.any // @ts-ignore https://caniuse.com/?search=promise.any
await Promise.any([':has-text("Continue")', '#webPurchaseContainer iframe'].map(s => page.waitForSelector(s))); // wait for Continue xor iframe 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) { if (await page.locator(':has-text("Continue")').count() > 0) {
console.log('Device not supported. This product is not compatible with your current device.'); // console.log('Device not supported. This product is not compatible with your current device.');
await page.click('button:has-text("Continue")'); await page.click('button:has-text("Continue")');
} }
// it then creates an iframe for the rest // it then creates an iframe for the rest