You can start or stop automatic CAPTCHA solving on an active session without recreating the browser. This is useful when you only want solving enabled around specific pages or workflows.
await client.sessions.startCaptchaSolving(session.id, { solverType: "visual",});// ... navigate to pages that may contain CAPTCHAsawait client.sessions.stopCaptchaSolving(session.id);
Set solverType to "visual" to use the visual reCAPTCHA solver. If omitted, the session uses the default automatic CAPTCHA solver configuration.
You can also trigger a bounded CAPTCHA evaluation on an active session. This runs once against the current browser pages and returns the evaluation result.
const result = await client.sessions.evaluateCaptcha(session.id, { captchaType: "recaptcha", iterations: 2,});
Supported manual CAPTCHA targets are turnstile, cloudflare-challenge, aliexpress, recaptcha, and amazon.
A better approach is to wait on session events so you know exactly when a CAPTCHA is detected and when it is solved. Below is an example using Playwright, but you can adapt the same logic for Puppeteer or other libraries.