Click Desktop Element
Command description
Clicks a desktop element.
Command Input Parameters
| Input parameter | Input parameter type | Description |
|---|---|---|
| Desktop Element | WinElement or str (captured element UID, not element name, not ms-rpa-id) | Element to click. Select a captured element or use Get Desktop Element, Get Similar Desktop Elements, or Get Related Desktop Elements. |
| Click Type | enum | Mouse Click, Silent Click |
| Click Method | enum | Single Click, Double Click |
| Mouse Button | enum | Left Button, Right Button |
| Click Position | enum | Random, Center |
| Modifier Key | enum | None, Alt, Ctrl, Shift |
| Post-Click Delay | number | Time to wait after clicking before continuing, in seconds |
| Element Wait Duration | number | Maximum time to wait for the element to appear, in seconds. The command reports an error if the element does not appear in time. |
Command Output Parameters
None
Click type
| click type | Description |
|---|---|
| Mouse Click | Brings the element's window to the front, moves the pointer to the element, and clicks it |
| Silent Click | Triggers the click through UI Automation without moving the mouse. It is faster, but some elements do not support it |
Type definition reference
tip
- This command automatically brings the window to the front and restores it if minimized, so Activate Window is normally unnecessary.
- Capture element reference Capture Desktop Elements
Example
Double-click the Chrome desktop icon to launch the browser.