Capture Desktop Element
Command description
Captures a screenshot of the specified element and saves it to a file. The element's window is automatically brought to the front.
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 capture. Select a captured element or use Get Desktop Element, Get Similar Desktop Elements, or Get Related Desktop Elements. |
| Folder | str | Full path of the folder in which to save the screenshot, for example C:\Screenshots |
| File Name Option | enum | Custom File Name, Random File Name |
| File Name | str | Screenshot file name. Required only when File Name Option is Custom File Name |
| 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
| Output parameters | Output parameter type | Description |
|---|---|---|
| Save Path | str | Full path of the saved screenshot |
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