Automation.Getter
Description
Retrieves the text from a selected field.
Properties
Analyst
- Description: Optional text for documentation purposes.
Common
-
Continue On Error: Continues the execution of the workflow even if an error occurs during the execution of the activity.
-
Delay Before: Delay time in milliseconds before the activity is executed. The default value is 250 milliseconds.
-
Delay After: Delay time in milliseconds after executing of the activity. The default value is 250 milliseconds.
-
Disable Log: Disables the logging functionality for this activity.
-
Disable Protocol: Disables the protocol functionality for this activity.
-
Exclude from Global Delay: Excludes this activity from the Global Delay functionality.
-
Timeout: Duration in milliseconds in which the activity tries to execute.
Element
- Automation Provider: The automation provider is usually automatically selected by the Smart Indicator depending on the application or browser you are automating. You can, however, change the automation provider manually while indicating (by pressing Shift + Up/Down)
- ArtefactID: If you have saved the selector value in an artifact, you can reference it here. If the value is 0, it is not connected to any artifact in the database.
- Element: In case you already retrieved the UIElement in the process, you can simply insert it in this field.
- Selector Value: This is the field where the Smart Indicator will store your indication result. You can, of course, also adjust the selector value manually.
- Show Debug Borders: If true draws a bounding rectangle around the element identified to be the target.
Input
-
Get Text Method:
Choose which method should be used to get the text.
- ApiCall: This is the default choice and fastest option. The event handler that is connected to the selected field will be triggered programmatically. This method doesn't work in all cases, because it is dependent on the target technology. If it cannot be automated natively, you have to switch to the other option. The method works in the background, i.e. the application does not have to be in the foreground.
- WindowsMessage: This is typically the next best option because it will work in some cases where ApiCall does not. Messages are directly sent to the window procedure. This option will work if your application responds to window messages. Since the message is sent to a specific window, this method can also be used for background processing.
Output
- Text: Set the variable in which the retrieved text will be saved. Make sure to provide a variable of type String.
For information on how to edit or manipulate your selector value, see the section on expert indicator within the Hyland RPA Designer documentation.
Example
Suppose you want to get the text from the Notepad text editor and display it in the log. Following the Golden Rule, you can use the Get Text Activity in the Attach Window scope (here the window title is "Monday - Editor"). Simply indicate the text editor and select the String variable (here: notepadText) in which the text should be saved in the property Text*.
Use the Write Log activity to display the result in the output log. The result should look like this:
Tips and Tricks
- Switch the Get Text Method if your text is not retrieved from your target element. If this does not solve the issue, you can combine the activities Move Mouse (to navigate to the correct coordinates), Mouseclick (to click into the field), Press Hotkey (Ctrl + C to copy the text into the clipboard) and Get Clipboard Text (to save the text from the clipboard in a variable of your choice) to simulate a human copying the text.
- Switch the Automation Provider manually and adjust the selector value if your element cannot be found using the default settings. For information on how to edit or manipulate your selector value, see "Selector Values in the Hyland RPA Designer Help.
Troubleshooting
-
Core.Activities.Exceptions.ElementNotFoundException: Failed to find Element by the Selector '<document name='Textditor' automationid='15' classname='Edit' />' using the AutomationProvider 'UI Automation' within '25000' ms.
-
Core.AutomationLibraries.AutomationLibraryBase.Exceptions. LazyComponentInitializationFailedException: Lazy initialization failed ---> AM.Core.AutomationLibraries.AutomationLibraryBase.Exceptions.ElementNotAvailableException ---> System.Runtime.InteropServices.COMException: Ein Ereignis konnte keinen Abonnenten aufrufen. (Ausnahme von HRESULT: 0x80040201).
Most likely your window or application was closed (maybe crashed) before the text could be retrieved. -
Core.AutomationLibraries.UiAutomation.Exceptions.UnkownPropertyException: Property 'nme' could no be found.
One or more of the properties in your selector value could not be found. This error often appears if you made a manual adjustment to your selector and introduces some typos and is usually solved by re-indicating the element.
See also