UNPKG

auto-captcha-solver

Version:

Automatically detect and solve various captcha types in Playwright & Puppeteer with 2Captcha/CapMonster Cloud integration

23 lines (22 loc) 959 B
import { TaskResult } from '@/types'; import { Page } from 'playwright'; declare global { interface Window { grecaptcha: any; gt4SuccessHandler?: () => void; captchaObjEventsV4?: { onSuccess?: () => void; }; } var grecaptcha: any; } /** * Injects the CAPTCHA solution into the relevant input field and verifies the injection. * @param page Playwright Page instance * @param selector The selector of the CAPTCHA response input field * @param token The CAPTCHA solution token to inject * @returns {Promise<boolean>} - Returns `true` if the token was successfully injected, otherwise `false` */ export declare function injectTokenResponse(page: Page, selector: string, token: string): Promise<boolean>; export declare function injectReCaptchaV3Response(page: Page, token: string): Promise<boolean>; export declare function injectGeeTestV4Solution(page: Page, solution: TaskResult): Promise<boolean>;