tool_click
Click an element on a webpage by providing a CSS selector or XPath. Waits for element to be clickable before executing.
Instructions
Click an element on the page.
This tool finds and clicks an element on the page using either CSS selector
or XPath. It will wait for the element to be clickable before attempting
to click it.
Args:
selector (str): The selector to find 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": "click", "args": {"selector": "#submit-button"}}
{"tool": "click", "args": {"selector": "//button[@type='submit']", "by": "xpath"}}
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| selector | Yes | ||
| by | No | css |