You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
An issue I've encountered involves bypassing the captcha and ensuring it's fully processed before attempting any interactions with the page, such as inputting login credentials. Even with the turnstile: true and fingerprint: true configurations enabled, my script attempts to interact with the page immediately after navigation, before the captcha can be resolved. To work around this, I've had to introduce a fixed delay (waitForTimeout(20000); at the start of the initial goto , but im wondering if it can like wait when it sees the cloudfare captcha , currently it solves the captcha but it just tries to find elements on the screen which are not yet available since the captcha is not finished yet . the issue also is that the cloudfare could popup on different times in the process , so i can't wait 20seconds after each step , is there a way to detect the captcha appearing through puppeteer-real-browser ?
thank you
this is a snippet from my code
`
const {
browser: browserInstance,
page,
setTarget,
} = await connect({
headless: false,
fingerprint: true, // Injects a unique fingerprint ID into the page
turnstile: true, // Automatically clicks on Captchas
tf: true, // Use targetfilter to avoid detection initially
});
browser = browserInstance;
setTarget({ status: false });
const page2 = await browser.newPage();
setTarget({ status: true });
// Navigate to the appointment page
await page2.goto(
"https://xxx",
{ waitUntil: "domcontentloaded" }
);
// Wait for 5 seconds
await page2.waitForTimeout(20000);
// Login
await page2.focus("#username");
await page2.type("#username", "xxxxx@gmail.com");
await page2.focus("#password");
await page2.type("#password", "xxxxx");
`
The text was updated successfully, but these errors were encountered:
https://github.com/zfcsoftware/puppeteer-real-browser/blob/main/src/module/turnstile.js
The above file provides the Captcha decoding function. First it checks if there is an iframe. If there is, it checks if there is a cgeckbox and clicks if there is. However, I haven't added any notification system that the captcha appears or is resolved in the process. I will add it in the future. If it is a Waf Captcha, if you don't use domcontentloaded, it waits until it is resolved. If it is a captcha in the form, we have not added a code that detects it for now, but this can be detected by making a few additions to the above file.
An issue I've encountered involves bypassing the captcha and ensuring it's fully processed before attempting any interactions with the page, such as inputting login credentials. Even with the turnstile: true and fingerprint: true configurations enabled, my script attempts to interact with the page immediately after navigation, before the captcha can be resolved. To work around this, I've had to introduce a fixed delay (waitForTimeout(20000); at the start of the initial goto , but im wondering if it can like wait when it sees the cloudfare captcha , currently it solves the captcha but it just tries to find elements on the screen which are not yet available since the captcha is not finished yet . the issue also is that the cloudfare could popup on different times in the process , so i can't wait 20seconds after each step , is there a way to detect the captcha appearing through puppeteer-real-browser ?
thank you
this is a snippet from my code
`
`
The text was updated successfully, but these errors were encountered: