/** * Form detector — extract form metadata from crawled pages. * * For each form found on a page, captures: action URL, method, all input fields * with their types/names/required/validation constraints, and submit button text. * * This data feeds ZeTa's test generator to create form validation test cases * automatically (happy path + boundary/error cases per field type). */ import type { Page } from 'playwright'; export interface FormField { name: string; type: string; label?: string; required: boolean; placeholder?: string; minLength?: number; maxLength?: number; min?: string; max?: string; pattern?: string; options?: string[]; autocomplete?: string; } export interface DetectedForm { index: number; action?: string; method: string; fields: FormField[]; submitText?: string; hasFileUpload: boolean; purpose: 'login' | 'search' | 'registration' | 'contact' | 'checkout' | 'settings' | 'unknown'; } export declare function detectForms(page: Page): Promise;