Trying to click on the "I accept all cookies" button which is inside iFrame (The popup only show for EU country ip). You can check here also jsfiddle.net/#&togetherjs=VgKpE0jfJF.
//index.js
const puppeteer = require('puppeteer');
(async () => {
const browser = await puppeteer.launch({
headless:false,
ignoreHTTPSErrors: true,
slowMo: 50,
args: ['--window-size=1440,900', '--disable-gpu', "--disable-features=IsolateOrigins,site-per-process", '--blink-settings=imagesEnabled=true']
});
const page = await browser.newPage();
await page.goto('https://www.oracle.com/cloud/cost-estimator.html');
await page.waitFor(3000)
const frame = page.frames().find(f => f.name() === 'iframe');
const acceptBtn = await frame.$(`a[class="call"]`);
await acceptBtn.click();
await page.screenshot({path: 'example.png'});
//await browser.close();
})();
The error i get
UnhandledPromiseRejectionWarning: TypeError: Cannot read property '$' of undefined
at
Please help. Thanks
