Set Text - Activities - Foundation 23.2 - Foundation 23.2 - Ready - Hyland RPA - external

Hyland RPA Activities

Platform
Hyland RPA
Product
Activities
Release
Foundation 23.2
License

Automation.Setter

Description

Sets a text into 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

  • Set 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
    • Focus and Send Keys: As its name suggests, this method brings the relevant window to the foreground and then uses the SendKeys class to send your keys. Since SendKeys places the keystrokes into the current window's input buffer, your target window has to be in focus before the keys are sent. This method is the slowest and not suitable for background tasks but offers the highest compatibility.
  • Text: The text that should be inserted into the selected field. This field accepts only strings. Hard-coded values must be surrounded by double quotation marks (for example, "Test").

Options

  • Clear Input: If this check box is checked, the field will be cleared before the text is set. This option is selected by default. If you do not want to overwrite the existing text, but you want to add your input text, the checkmark must be removed.
  • Delay After Clear Input: Set a delay time (in ms) between clearing input and filling it. Only used if Clear Input is checked.

Example

Suppose you want to set a text in the Notepad text editor. Following the Golden Rule, you can use the Set Text Activity in the Attach Window scope (here the window title is "Untitled - Editor"). Simply indicate the text editor and provide the text (here: "Carpe diem") that should be set to the text property.

The result should look like this:

Tips and Tricks

  • Remember that you can call the ToString()-method on any object (for example, integers, doubles, etc.) to convert it into a string (although often you don't want to convert the parent object itself, for example a DataTable, to a string)
  • Switch the Set Text Method if your text is not set to your target element. If this does not solve the issue, you can use the Click Image Send Text activity as a workaround.
  • Switch the Automation Provider manually and adjust the selector value if your element cannot be found using the default settings.

    See the Selector Value chapter of the Hyland RPA Designer documentation for information on how to edit or manipulate your selector value.

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.
    The activity was unable to find the element you are looking for. Check your selector value. Most likely it is either incorrect or too unspecific. Use the Indicate with Result option or make your selector variable (sometimes selector values change dynamically) using variables or wildcards. If the workflow should continue even if no element was found, you can check the Continue On Error property.
  • 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 set.
  • AM.Core.AutomationLibraries.UiAutomation.Exceptions.UnkownPropertyException:
    Property 'nme' could not 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 introduced some typos and is usually solved by re-indicating the element.

See also