activities
latest
false
UiPath logo, featuring letters U and I in white
UI Automation Activities
Last updated Nov 22, 2024

Type Into

UiPath.Core.Activities.TypeInto

Sends keystrokes to a UI element.

Special keys are supported and can be selected from the drop-down list.

Sticky keys are also supported. For example, if you want to type Shift+End to select only part of the text of a control, you need to select Shift and End from the list of special keys and the proposed text is [k(Shift)][k(End)]. This emulates the Shift and End key presses sequentially. The correct text is [d(Shift)][k(End)][u(Shift)], where d stands for key down, k stands for key press, and u stands for key up.

Properties

Input
  • Text - The text to be written in the specified UI element. Special keys are supported, and you can select them from the activity's drop-down list.

    It is also possible to send down key presses or send up key presses by using this syntax:

    %[d(ctrl)] - to press a specific button down;
    %[u(ctrl)] - to lift a specific button up.
For example, to send a CTRL + V key combination, you can use %[d(ctrl)]v[u(ctrl)].
Note: This only works for the Default and SendWindowMessages options (see below).
Options
  • SimulateType - If selected, it simulates the type using the technology of the target application. This input method is the fastest of the three and works in the background. By default, this check box is not selected. If neither this nor the SendWindowMessages check boxes are selected, the default method performs the keystrokes using the hardware driver. The default method is the slowest, it cannot work in the background, but it is compatible with all desktop apps. If you select this property, it is recommended to check the state of the target UI element prior to execution. More details can be found on this page.
  • SendWindowMessages - If selected, the type is executed by sending a specific message to the target application. This input method can work in the background, is compatible with most desktop apps, but it is not the fastest of the methods. By default, this check box is not selected. If neither this nor the SimulateType check boxes are selected, the default method simulates the keystrokes by using the hardware driver. The default method is the slowest, it cannot work in the background, but it is compatible with all desktop apps.
  • DelayBetweenKeys - Delay time (in milliseconds) between two keystrokes. The default amount of time is 10 milliseconds. The maximum value is 1000 milliseconds.
  • ClickBeforeTyping - When this check box is selected, the specified UI element is clicked before the text is written.
  • EmptyField - When this check box is selected, all previously-existing content in the UI element is erased before writing your text.

    Note: In Web environments, fields are emptied by default.
  • Activate - When this check box is selected, the specified UI element is brought to the foreground and activated before the text is written.

    Note: If the Activate check box is not selected, the activity will type into the current active window.
  • AlterIfDisabled - If enabled, the action is executed even if the specified UI element is disabled.
Common
  • DisplayName - The display name of the activity.
  • DelayAfter - Delay time (in milliseconds) after executing the activity. The default amount of time is 300 milliseconds.
  • DelayBefore - Delay time (in milliseconds) before the activity begins performing any operations. The default amount of time is 200 milliseconds.
  • ContinueOnError - Specifies if the automation should continue even when the activity throws an error. This field only supports Boolean values (True, False). The default value is False. As a result, if the field is blank and an error is thrown, the execution of the project stops. If the value is set to True, the execution of the project continues regardless of any error.

    Note: If this activity is included in Try Catch and the value of the ContinueOnError property is True, no error is caught when the project is executed.
Misc
  • Private - If selected, the values of variables and arguments are no longer logged at Verbose level.
  • Target.Selector - Text property used to find a particular UI element when the activity is executed. It is actually a XML fragment specifying attributes of the GUI element you are looking for and of some of its parents.
  • Target.TimeoutMS - Specifies the amount of time (in milliseconds) to wait for the activity to run before the SelectorNotFoundException error is thrown. The default value is 30000 milliseconds (30 seconds).
  • Target.WaitForReady - Before performing the actions, wait for the target to become ready. The following options are available:

    • None - Does not wait for anything except the target UI element to exist before executing the action. For example, you can use this option if you want to retrieve just text from a web page or click a particular button, without having to wait for all UI elements to load. Note that this may have unwanted consequences if the button relies on elements which are not yet loaded, such as scripts.
    • Interactive/Complete - Waits all of the UI elements in the target app to exist before actually executing the action.

      To assess if an application is in the Interactive or Complete state, the following tags are verified:

    • Desktop applications - A wm_null message is sent to check the existence of the <wnd>, <ctrl>, <java>, or <uia> tags. If they exist, the activity is executed.
    • Web applications:
    1. Internet Explorer - The <webctrl> tag is used to check if the Ready state of the HTML document is set to Complete. Additionally, the Busy state has to be set to "False".
    2. Others - The <webctrl> tag is used to check if the Ready state of the HTML document is Complete.
    • SAP applications - First the presence of the <wnd> tag verified, after which a SAP specific API is used to detect if the session is busy or not.
  • Target.Element - Use the UiElement variable returned by another activity. This property cannot be used alongside the Selector property. This field supports only UiElement variables.
  • Target.ClippingRegion - Defines the clipping rectangle, in pixels, relative to the UiElement, in the following directions: left, top, right, bottom. It supports both positive and negative numbers.

Example of using the Type Into activity

Here you can see how the Type Into activity is used in an example that incorporates multiple activities.

  • Properties
  • Example of using the Type Into activity

Was this page helpful?

Get The Help You Need
Learning RPA - Automation Courses
UiPath Community Forum
Uipath Logo White
Trust and Security
© 2005-2024 UiPath. All rights reserved.