geetest-captcha-solver icon indicating copy to clipboard operation
geetest-captcha-solver copied to clipboard

Headless Mode

Open xinlangzi opened this issue 3 years ago • 0 comments

@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.

xinlangzi avatar Jul 11 '22 14:07 xinlangzi