Get Desktop Element
Command description
Retrieve a specified desktop element and access its coordinates, dimensions, displayed text, and other information. Use Get Related Desktop Elements to retrieve its parent, children, siblings, or descendants.
For example, you can directly use the following Python expression to obtain relevant data:
| Python expression | Description |
|---|---|
winElement.name | The text displayed by the element |
winElement.text | Input box text |
winElement.left | Physical-pixel distance from the left edge of the screen to the element's left edge; reading it brings the element's window to the front |
winElement.top | Physical-pixel distance from the top edge of the screen to the element's top edge; reading it brings the element's window to the front |
winElement.right | Physical-pixel distance from the left edge of the screen to the element's right edge; reading it brings the element's window to the front |
winElement.bottom | Physical-pixel distance from the element's bottom edge to the screen's bottom edge; reading it brings the element's window to the front |
winElement.width | Element width in physical pixels; reading it brings the element's window to the front |
winElement.height | Element height in physical pixels; reading it brings the element's window to the front |
For other WinElement properties, see the WinElement class definition.
Command Input Parameters
| input parameters | Input parameter type | Description |
|---|---|---|
| Desktop Element | str | Captured desktop element UID, not its name or ms-rpa-id |
| Element Wait Duration | number | Maximum time to wait for the element to appear, in seconds; an error is raised if the timeout expires |
Command Output Parameters
| Output parameters | Output parameter type | Description |
|---|---|---|
| Desktop Element | WinElement | The retrieved element. Its coordinate properties use physical screen pixels; reading them brings the element's window to the front. |
Type definition reference
tip
- Capture element reference Capture Desktop Elements
- Runavelo's type system lets you access relevant information directly from objects without additional commands. This reduces the number of intermediate objects and keeps workflows simpler and clearer.
- If the required element has not been captured, the AI can call the
start_capture_win_elementtool.