fill_and_submit_form
Interact with web forms by filling text inputs, checkboxes, dropdowns, and file uploads. Optionally submit forms for search, login, or contact pages using browser automation methods like Selenium or Playwright.
Instructions
Fill and optionally submit a form on a webpage.
This tool can handle various form elements including:
Text inputs
Checkboxes and radio buttons
Dropdown selects
File uploads
Form submission
Useful for interacting with search forms, contact forms, login forms, etc.
Input Schema
Name | Required | Description | Default |
---|---|---|---|
request | Yes |
Input Schema (JSON Schema)
{
"$defs": {
"FormRequest": {
"description": "Request model for form interaction operations.",
"properties": {
"form_data": {
"additionalProperties": true,
"description": "Form field data (selector: value pairs)",
"title": "Form Data",
"type": "object"
},
"method": {
"default": "selenium",
"description": "Method to use: selenium or playwright",
"title": "Method",
"type": "string"
},
"submit": {
"default": false,
"description": "Whether to submit the form",
"title": "Submit",
"type": "boolean"
},
"submit_button_selector": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Selector for submit button",
"title": "Submit Button Selector"
},
"url": {
"description": "URL of the page containing the form",
"title": "Url",
"type": "string"
},
"wait_for_element": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Element to wait for before filling form",
"title": "Wait For Element"
}
},
"required": [
"url",
"form_data"
],
"title": "FormRequest",
"type": "object"
}
},
"properties": {
"request": {
"$ref": "#/$defs/FormRequest",
"title": "Request"
}
},
"required": [
"request"
],
"type": "object"
}