browser_smart_fill
Automatically generate realistic test data for form fields by field type, then fill the target input. Supports email, phone, name, address, and more to cover edge cases.
Instructions
Smart form filler: auto-generate format-valid realistic test data by field type and fill the target input. Supports 10+ types (email, phone, name, address, idCard, number, text, url, date, password); each call produces random data to cover edge cases.
中文详情:
用途:智能表单填充工具,根据字段类型自动生成符合格式的真实测试数据并填入指定输入框
何时使用:注册表单需要合法邮箱/手机号时;地址表单需要格式正确数据时;密码字段需要符合复杂度要求时;批量生成测试数据覆盖边界场景时
输出:{ ok: boolean, selector: string, fieldType: string, generatedValue: string, timestamp: string }
参数:
selector (string, 必填):目标输入框的 CSS 选择器
fieldType (string, 必填):字段类型,可选 email/phone/name/address/idCard/number/text/url/date/password
options (object, 可选):生成选项,各字段类型有不同选项
domain (string, 可选):email 类型的域名
min (number, 可选):number 类型的最小值
max (number, 可选):number 类型的最大值
minLen (number, 可选):text 类型的最小长度
maxLen (number, 可选):text 类型的最大长度
start (string, 可选):date 类型的起始日期
end (string, 可选):date 类型的结束日期
错误:selector 无匹配抛出 'element not found';fieldType 非法抛出 'Invalid fieldType';元素不可编辑抛出 'element not editable'
示例:{"selector":"#email","fieldType":"email","options":{"domain":"test.com"}}
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| options | No | 生成选项(可选),各字段类型有不同选项 | |
| selector | Yes | 目标输入框的 CSS 选择器 | |
| fieldType | Yes | 字段类型,支持: email | phone | name | address | idCard | number | text | url | date | password |