Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Headless Mode #2

Open
xinlangzi opened this issue Jul 11, 2022 · 0 comments
Open

Headless Mode #2

xinlangzi opened this issue Jul 11, 2022 · 0 comments

Comments

@xinlangzi
Copy link

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

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant