Get element text Version 18 (.Net)
Action group: Windows
Description
The action returns the text of the selected element.
Action icon
Settings of parameters
Property | Description | Type | Filling example | Mandatory field |
Parameters | ||||
Element | Resource with data of selected element in application | Robin.WinElement | Yes | |
Time-out | Time in milliseconds to find required window. | Robin.Numeric | No | |
Window order | When found more than one window, action would interact with window defined by order | Robin.Numeric | No | |
Results | ||||
Result | Text from selected item | Robin.String |
Special conditions of use
Preliminary activation of the window with the element is not needed.
The group does not work with taskbar, explorer, and workspace.
Example of use
Task
There is an open "Parameters" window. Get element text (processor name).
Solution
Use the "Get element text", "Show message" actions.
Implementation
- Move the "Get element text", "Show message" actions to the workspace.
- Set the "Get element text" action parameters. Get the element with the WinSpy tool. Working with WinSpy is described in section Get Win-element
Setting a timeout does not, in general, increase the execution time of an action beyond the time it takes for the item we are using in the action to become visible and accessible. During the set timeout, the action tries to access the element it is working with. As soon as the item is available, the waiting timeout expires. - Set the "Show message" action parameters. In the "Message text" field specify the "Get element text" action result.
- Click "Start" in the top panel.
Result
The program robot completed successfully.
The robot displayed the element text.
Обзор
Инструменты контента