I'm trying to pass a value to the browser created by the puppeteer, but this error appears:
Cannot read property 'getElementById' of undefined
async function start() {
const browser = await puppeteer.launch({
headless : false
});
const page = await browser.newPage();
await page.goto('https://www.google.com/recaptcha/api2/demo?invisible=true');
await page.document.getElementById("g-recaptcha-response").innerHTML === response.text
await Promise.all([
page.click('#recaptcha-demo-submit'),
]);
}
The error is in this line:
await page.document.getElementById("g-recaptcha-response").innerHTML === response.text
what am I doing wrong?
Thanks.