click_element
Click a web page interactive element by its index, obtained from get_interactive_elements.
Instructions
Click an interactive element on the current webpage using its index.
Purpose
This tool allows the agent to click buttons, links, or other interactive
UI elements on the page. The element must first be discovered using
get_interactive_elements, which returns a list of visible elements and
assigns each one an index.
The index returned by get_interactive_elements must be used with this
tool to select the correct element.
Recommended Agent Workflow
Navigate to the desired page using
open_url.Wait for the page to load using
wait_for_page.Call
get_interactive_elementsto discover clickable elements.Review the returned elements and identify the correct one.
Call
click_elementusing the element's index.If navigation occurs after clicking, call
wait_for_pageagain.
Parameters
session_id : str
Active browser session identifier returned by open_browser.
index : int
Index of the element to click. This index must correspond to an
element returned by get_interactive_elements.
Returns
dict { "session_id": str "index": index of the element that was clicked, "status": str "message": str }
Error Conditions
If
get_interactive_elementshas not been called yet, the element cache will be empty and the tool will return an error.If the provided index does not exist in the cached elements list, the tool will return an "Invalid element index" error.
Notes
The tool automatically scrolls the element into view before clicking to ensure it is visible and interactable.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| index | Yes | ||
| session_id | Yes |