tool_type
Finds an input element, clears existing text, and types specified text into it using CSS or XPath selectors.
Instructions
Type text into an element.
This tool finds an input element and types the specified text into it.
It will clear any existing text in the element before typing.
Args:
selector (str): The selector to find the element
text (str): The text to type into the element
by (str, optional): The selector type. Either "css" or "xpath". Defaults to "css"
Returns:
Dict[str, Any]: A dictionary containing:
- success (bool): Whether the operation was successful
- message (str): Status message
Example:
{"tool": "type", "args": {"selector": "#search-input", "text": "search query"}}
{"tool": "type", "args": {"selector": "//input[@name='q']", "text": "search", "by": "xpath"}}
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| selector | Yes | ||
| text | Yes | ||
| by | No | css |