puppeteer-extra: recaptcha methods are missing on initial browser's page

Consider this example

	//const page = await browser.newPage();
	const pages = await browser.pages();
	const page = pages[0];

	await page.goto('https://dmitriy.in.ua/');

	const frames = page.mainFrame().childFrames();
	const frame = frames[0];
	console.log(await frame.findRecaptchas());

	await browser.close();

It doesn’t work, the error is:

(node:2074386) UnhandledPromiseRejectionWarning: TypeError: frame.findRecaptchas is not a function

But if you switch to newPage() method (which is used in tutorial) instead of using the current page, everything would work.

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 16 (7 by maintainers)

Most upvoted comments

@berstend I meant I’ve fixed the formatting not the error. 😆 So I’m still having issues with the puppeteer extra plugin solveRecaptcha.