Get element property

Description

Extracts the value of the specified attribute in a selector. The 'Save value to variable' activity appears automatically when choosing the 'Get element property' activity. It automatically saves the value to a variable. However, the activity is not mandatory to use and can be removed from the workflow.

Parameters

Interface element

Allows you to select an item from a list of created ones. After the item has been selected, the visual display of the item will automatically appear.

If the 'Use focused element' option is selected then the robot will read the property of the element where the cursor is located.

Property name

Enables you to enter the attribute name to extract its value, for example, Id, Name, ClassName, Type and other attributes.

Comment

Contains an annotation to the activity. The input text will be displayed above the activity name.

Result

The property is stored in the element_property_value variable by default. This variable represents a string. For example, if the field to edit text of the 'Notepad' application in Windows 10 is selected using the 'Element Picker' tool and the 'Name' attribute is specified in the 'Property Name' parameter, then the result will be the following: "Text Editor".

Usage Examples

This activity may be your choice when it is required to extract a name of a button, for instance.