Get Text
AutomatR.Windows.Activities.GetText
The "Get Text" activity in AutomatR for Windows UI Automation extracts a text value from a specified UI element, allowing seamless integration of text extraction in automation workflows.
Properties
Name | Description |
---|---|
Input | |
Windows Selector | Specifies the UI element from which to extract text. Use the "Selector" property to indicate the target UI element. The selector is generated using the Windows Selector Editor. |
Windows Element | Allows the selection of a UI element using a custom selector, providing more flexibility in choosing the target element. If not provided, the selector from the "Windows Selector" property is used. |
Misc | |
Display Name | Provides a customizable name for the activity displayed in the workflow. String variables containing the desired display name. |
Optional | |
Timeout | Sets the maximum time (in seconds) the activity should wait for the text extraction to complete before throwing an exception. Default is the common timeout defined in the Constants (e.g., 5 seconds). |
Delay | Specifies the wait time (in seconds) before starting the activity, allowing for synchronization in automation workflows. Default is 0 seconds. |
Output | |
Result | Outputs the extracted text value as a string. This variable can be used in subsequent activities for further processing or verification. |
How to use:
- Drag and drop the "Get Text" activity onto the workflow.
- Configure the properties by specifying the UI element from which to extract text using either the "Windows Selector" or "Windows Element."
- Optionally, set the timeout and delay values as needed.
- Execute the workflow to extract the text from the specified UI element.
Example: Consider an example where the "Get Text" activity is used to extract the text from a specific UI element:
Get Text:
Display Name: "Extract Text from Element"
Windows Selector: <ProvideSelectorHere>
Result: extractedText
In this example, the activity extracts the text from the specified UI element using the provided selector, and the extracted text is stored in the variable "extractedText" for further use in the workflow.