/** * Field-value provider abstraction. Drivers that fill form fields * (`formDriver`, `payloadDriver`) delegate value generation to a * `FieldValueProvider` so payload strategies can be swapped without * forking the driver itself. * * The provider sees structured field metadata (HTML input attributes * plus accessible name / placeholder) and returns one value string per * call. Returning `null` skips the field — useful when a payload set * only targets one type (e.g. URL-only SSRF payloads). */ import type { Rng } from "../random.js"; export interface FormFieldInfo { /** Playwright selector. */ selector: string; /** Accessible name / label / aria-label. Most useful field metadata. */ name?: string; /** * Input element type (text / email / number / url / tel / search / * password / date / textarea / select / checkbox / radio). For non-input * tags the tag name is used. */ inputType?: string; /** `placeholder` attribute, if present. */ placeholder?: string; /** `pattern` regexp string (HTML5 form validation). */ pattern?: string; /** `minlength` / `maxlength`. */ minLength?: number; maxLength?: number; /** `min` / `max` for numeric / date inputs. */ min?: string; max?: string; /** `required` flag. */ required?: boolean; /** Available `