click_element
Click a GUI element by accessible name, waiting for it to appear, or click a point by x/y. It can hold a button and gives the clicked window keyboard focus.
Instructions
Click an element by its accessible name, or a point by x and y, on the screen or inside a window. By name is the one to use: it waits up to timeout seconds for the node, raises its window and clicks its middle, and the answer gives the node and its bounds. When two nodes match it lists them, with where they are; when none does, the nearest names. A click gives a window the keyboard, which nothing else does on X11. hold and state, by x and y, hold the button as press_keys holds keys.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | No | Pixels from the left | |
| y | No | Pixels from the top | |
| hold | No | Seconds to keep it down before letting go | |
| name | No | A node's name, as get_accessible_tree gives it: exactly, or a regex matched in full | |
| role | No | Narrows name: exactly, or a regex | |
| state | No | Only press, leaving it down until a call with up; or only let go | |
| button | No | 1 left, 2 middle, 3 right | |
| double | No | Click twice, as a double click | |
| window | No | A window's title, exactly or a regex matched in full, or app=RE for its app id | |
| session | Yes | Its name, from start_session | |
| timeout | No | By name, seconds to wait for the node (10) |