Skip to main content

Get details of UI element in window

Sophie avatar
Written by Sophie
Updated over 2 weeks ago

Definition and Usage

This command retrieves the value of a specified attribute from a UI element in a window. It allows you to extract information such as text content, values, coordinates, or other attributes from UI elements, which can be useful for data extraction, validation, or conditional logic in your automation workflows.


Parameter Values

Input parameters

Parameter

Description

Possible Values

Required

Options / Notes

Element

Select or capture an element to operate on

N/A

Yes

Use the capture button to select the desired UI element

Get

Select the element attribute to get

Text content, Value, Other attributes, Coordinates

Yes

The type of information you want to extract from the element

Attribute name

Set attribute name of the window element

N/A

Yes (only when "Other attributes" is selected)

Common attributes include id, class, name, title, etc.

Relative to

Relative to the entire screen or the window containing the element

Screen top-left corner, Active window top-left corner

Yes (only when "Coordinates" is selected)

Determines the reference point for coordinate calculations

Save element information as

Store the element attribute in a new variable

N/A

Yes

The variable name where the extracted information will be stored

Advanced settings

Parameter

Description

Possible Values

Required

Options / Notes

Element timeout (s)

Wait time for element to appear (seconds)

Numeric value

No

Default is 20 seconds; increase for slow-loading elements

Error handling

Parameter Name

Description

Throw error & stop

When an error occurs, the action will trigger an error and stop the execution of the entire app.

Retry command

If an error occurs, the action will retry the command in an attempt to resolve the issue and continue the process.

Ignore error & continue

When an error occurs, the action will be ignored, and the workflow will continue without interruption.

Variables produced

This action produces a variable containing the requested information from the UI element. The variable type depends on the attribute being retrieved:

  • Text content: returns the visible text of the element

  • Value: returns the value attribute of the element

  • Other attributes: returns the value of the specified attribute

  • Coordinates: returns the position coordinates of the element


Using Variables in Conditions

You can use the output variable in subsequent actions by referencing it with the {x} syntax. For example, if you saved the text content as "elementText", you could use {elementText} in a condition to make decisions based on the element's content.

The extracted information can be used for:

  • Conditional logic (if/else decisions based on element content)

  • Data extraction and processing

  • Validation of UI states

  • Dynamic navigation based on element properties


Notes

  • The element must be visible on screen when the command executes, or the command will wait until the timeout period expires.

  • For elements that dynamically load or change, consider increasing the element timeout value.

  • When retrieving coordinates, be aware that different reference points (screen vs. active window) may affect your automation logic.

  • Some UI elements may not have all attributes available; test your automation to ensure the desired attribute can be retrieved.

  • The command may fail if the UI element's structure changes or if the application is updated.

Did this answer your question?