import { Page } from 'playwright'; /** * 滑块验证码处理模块 * * 处理山东电力交易中心的拼图滑块验证码 * 验证码类型:拼图滑块(需要将滑块拖动到正确位置完成拼图) */ export interface SliderCaptchaResult { success: boolean; message: string; attempts: number; } /** * 等待滑块验证码弹出 * @param page Playwright 页面实例 * @param timeout 超时时间(毫秒) */ export declare function waitForSliderCaptcha(page: Page, timeout?: number): Promise; /** * 分析滑块验证码结构 * 返回滑块和目标位置的信息 */ export declare function analyzeSliderCaptcha(page: Page): Promise<{ sliderElement: string | null; trackElement: string | null; puzzleImage: string | null; backgroundImage: string | null; }>; /** * 计算滑块需要移动的距离 * 通过图像分析找到拼图缺口位置 */ export declare function calculateSlideDistance(page: Page): Promise; /** * 模拟人类拖动滑块的行为 * 包含加速、减速、微调等特征 */ export declare function humanLikeSlide(page: Page, sliderSelector: string, distance: number): Promise; /** * 尝试解决滑块验证码 * @param page Playwright 页面实例 * @param maxAttempts 最大尝试次数 */ export declare function solveSliderCaptcha(page: Page, maxAttempts?: number): Promise; /** * 在滚动撮合交易页面触发滑块验证码(安全测试) * * 安全措施: * 1. 不填写任何表单数据 * 2. 只点击"申报"按钮触发滑块 * 3. 由于没有填写数据,即使滑块通过也会因验证失败而不会成交 */ export declare function triggerSliderCaptchaForTest(page: Page): Promise<{ triggered: boolean; message: string; }>; //# sourceMappingURL=slider-captcha.d.ts.map