Skip to main content

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

NameDescription
Input
Windows SelectorSpecifies 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 ElementAllows 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 NameProvides a customizable name for the activity displayed in the workflow. String variables containing the desired display name.
Optional
TimeoutSets 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).
DelaySpecifies the wait time (in seconds) before starting the activity, allowing for synchronization in automation workflows. Default is 0 seconds.
Output
ResultOutputs the extracted text value as a string. This variable can be used in subsequent activities for further processing or verification.

How to use:

  1. Drag and drop the "Get Text" activity onto the workflow.
  2. Configure the properties by specifying the UI element from which to extract text using either the "Windows Selector" or "Windows Element."
  3. Optionally, set the timeout and delay values as needed.
  4. 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.