The Get Text action is used to populate a variable with the text contents of a control in a window. The variable must be created in an earlier step using the Create Variable action. Where it can be used, this action is superior to the Copy action because it communicates natively with the target control, and the application is not required to be in the foreground.
Important: Only standard Windows controls will work with the Get Text action. Many applications use images or other controls that may act like Windows controls but do not support the interfaces required to detect them. The Get Text action will not work with these controls. In these cases other interactivity actions must be used such as the Copy action.
From the Task Builder Available Actions pane, open the Interactivity folder and double-click the Get Text action or drag it into the Steps pane.
In the Populate variable with text box, select the variable to populate.
If possible, open the window containing the object you want to use. Then drag the AutoMate icon to the object. This will automatically populate the object description. If you cannot use the actual object, use a similar object and then edit the object description per the next step. You can also drag the AutoMate icon to the window that contains the object, and then click the Browse button and use the tree structure to find and select the object.
If you need to make changes to the auto-populated properties, click Edit and change the properties according to the following guidelines:
Select or clear the check boxes to indicate which properties are required.
Edit any required properties as desired. You can use wildcard characters asterisk (*) or question mark (?) in titles, classes, names, or values. For example *report* can be used to specify any name containing the word report.
To use a variable or expression, click within any box and then click the Insert Expression/Variable button and use the Expression Builder to enter it.
The properties are as follows:
Window title must be: the window title as shown in the title bar. The entry is case sensitive.
Window class must be: the class of window, such as Microsoft Word (OpusApp), or Adobe Acrobat (AdobeAcrobat). The drop-down list shows the classes of all currently open windows. The entry is case sensitive.
Window handle must be: a unique value that Windows assigns each time a window is created. You might use this for situations where there may be more than one copy of the same application open.
Object type must be: the type of object, such as title bar, drop-down list, or toolbar.
Object class must be: the Windows class of the object.
Object name must be: the name of the object. You can use wildcard characters asterisk (*) or question mark (?) in the object name.
Object value must be: the value populating the object, such as a selection in a drop-down list.
Object position must be: the coordinates for the position of the object on the screen.
In the Get text from box, select value property, name property, or auto-detect. (The Object Description section shows the name and value for the selected object.)
To set the Description tab properties, refer to Description Tab Options.
To set the Error Causes and On Error tab properties, refer to Step Error Handling.
When finished, click OK to save settings and close the properties dialog window.
Adding Task Steps
Get Text Action