Get element property

Description

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

Parameters

Change the element

Enables you to manually specify an element. Once the element is chosen, a list of attributes appears. These attributes can be excluded or included.

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, Name.

Comment

Contains an annotation to the block. The input text will be displayed inside the block above the function 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 function may be your choice when it is required to extract a name of a button, for instance.