test_form
Fill a web form by matching field names or placeholders, type values, click the submit button, and verify the result matches expected success, validation error, or any outcome.
Instructions
Fill a form, submit it, and verify the result — all in one call.
Matches fields by name/placeholder, types values, clicks submit, then checks if the operation succeeded or failed as expected.
Args: form_fields: Dict mapping field name to value. Example: {"email": "test@test.com", "password": "abc123"} submit_text: Text of submit button to click. Auto-detects if empty. submit_index: Element index of submit button. Used if submit_text is empty. expected_result: "success" (expect redirect/success msg), "validation_error" (expect error msg), or "any"
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| form_fields | Yes | ||
| submit_text | No | ||
| submit_index | No | ||
| expected_result | No | success |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |