geetest-captcha-solver
geetest-captcha-solver copied to clipboard
Headless Mode
@Dirk94
Your solution works well almost. But I have a challenge if the headless: false, the waitForSelector Canvas always failed.
It's this website. https://www.cnc-line.com/ebusiness/tracking, which uses the iframe.
async function slideCaptcha() {
frame = await page.frames().find((frame) => /captcha/.test(frame.url()));
if (frame) {
console.info("Frame Found")
await frame.waitForSelector('[aria-label="Click to verify"]');
console.info("Click to Verify");
await frame.click('[aria-label="Click to verify"]');
await frame.waitForSelector('.geetest_canvas_img canvas', { visible: true });
console.info("Canvas Loaded");
.....
return true;
}
return false;
}
Please help me when you have time. Thank you very much.