activities
latest
false
UiPath logo, featuring letters U and I in white

UI Automation Activities

Last updated Dec 20, 2024

Type Into

UiPath.UIAutomationNext.Activities.NTypeInto

Description

Enters text in a specified UI element, for example a text box.

You can also send special keys like Tab or Enter to the UI element.

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.

If you want to enter sensitive information securely, add a Get Username/Password activity before this activity and select the saved for later username and password values from that activity as the text to type.

This activity must be added inside a Use Application/Browser activity.

To use this activity outside a Use Application/Browseractivity, you need to provide an Input element.

This activity is compatible with Object Repository.

To learn how to use this activity, see:

Prerequisites for Entering Login Information Securely

Before you can enter username/password information securely using this activity, you must first:

  1. Add a Get Username/Password activity to the project.
  2. In the Get Username/Password activity, select credentials previously saved to the Windows Credential Manager. If the credentials you want to use are not already saved in the Windows Credential Manager, you can use this activity to add them.
  3. Save the credentials for later use in the project.

Project compatibility

Windows - Legacy | Windows | Cross-platform

Windows - Legacy, Windows configuration

Designer panel
  • Click Indicate in App/Browser to indicate the UI element to use as target.

    This step is not required if the element is already in focus in the target application.

    After you indicate the target, select the Menu button to access the following options:

    • Indicate target on screen - Indicate the target again.
    • Edit target - Open the selection mode to configure the target.
    • Add auto-verification / Remove verification - Adds or removes the verification of the action performed by the activity. Verify execution is enabled by default.
    • Remove informative screenshot - Remove the screenshot of the target application or web page.
    • Add to Object Repository - Add the current UI element to a library project, from where it can be reused throughout your automation process.
  • Type this - The text to enter. You can use the drop-down menu to select a special key to send to the text field or you can add special keys from the Text Builder. You can also use the options from the Plus menu inside the Text Builder to add values saved for later or add data from the Project Notebook or parent Use Excel File or Use Outlook Account activities. Any combination of text, Excel or Outlook data, and special keys is supported.

  • Empty field before typing - Select whether to delete the existing content in the field before typing the text, and how to empty the field. Fields are emptied by sending a combination of keystrokes that differs between fields with a single line and fields with multiple lines. Make sure to select the right option depending on the indicated field. The options are:
    • None - Do not delete the existing content.
    • Single line (End, Shift+Home, Del) - Delete the content from a text field with a single line. This is the default option.
    • Multi line (Ctrl+A, Del) - Delete the content from a text field with multiple lines.

    To use the activity to clear the indicated text field, configure this property to delete the existing content, leave the Type this field empty, and set the Input Mode property to Hardware Events.

  • Click before typing - Select whether to click the specified UI element before typing the text, and the type of click to perform. The options are None (do not click), Single (execute a single click), or Double (execute a double click).

    The default option is Single.

  • Verify that the text is empty - This option appears if Add auto-verification is selected. You can indicate in the current application or in any application.
Properties panel

Common

  • Continue on error - 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.
  • Delay after - Delay (in seconds) between the time this activity is completed and the time the next activity begins any operations. The default value is 0.3 seconds. Adding a delay between activities ensures that one activity has enough time to complete before the next activity begins.

  • Delay before - Delay (in seconds) between the time the previous activity is completed and the time this activity begins performing any operations. The default value is 0.2 seconds. Adding a delay between activities ensures that one activity has enough time to complete before the next activity begins.

  • Display name - The name displayed for the activity in the Designer panel. A display name is automatically generated when you indicate a target.

  • Timeout - Specify the amount of time (in seconds) to wait for the activity to be executed before throwing an error. The default value is 30 seconds.

Input

  • Secure text - The secure text to enter. The field supports only SecureString variables. If this field is configured, the Text field is cleared. The maximum string length for this field is 65536 characters.
  • Target - The target element. Target element must be set. Before indicating on screen, this field is set to (null). Once the target is indicated, all properties regarding the element that was indicated are displayed.
    • Click offset - Specifies an offset for the click activity, which can be further configured.
      • Anchoring point - Describes the starting point of the cursor to which it offsets from Offset X and Offset Y properties are added. The following options are available: TopLeft, TopRight, BottomLeft, BottomRight, and Center. By default, Center is selected.
      • Offset X - Horizontal displacement of the cursor position according to the option selected in the Anchoring point field. This field supports only Int32 variables.
      • Offset Y - Vertical displacement of the cursor position according to the option selected in the Anchoring point field. This field supports only Int32 variables.
    • CV Control type - Indicates the type of control identified using Computer Vision.
    • CV Text - Indicates the text identified using Computer Vision.
    • Fuzzy selector - The parameters for the fuzzy selector.
    • Native text - The text that is used to identify the UI element.
    • Responsive websites - Enable responsive websites layout.
    • Strict selector - The strict selector generated for the UI element.
    • Targeting methods - The selector types that you want to use for identifying the element. This property can be set to any combination from the drop-down menu:
      • None
      • Strict selector
      • Fuzzy selector
      • Image
      • Native text
      • Computer Vision - To use Computer Vision as a targeting method, you need to go to Project Settings > Computer Vision and make sure to set the correct server endpoint. You can leave this field as it is and use UiPath Cloud, which is filled-in by default, or you can enter another value either by selecting any of the other public endpoints specific to a server region or your own on-premises server.

        Another way of using Computer Vision as a targeting method is to set Use Local Server to True. This implies that the UiPath.ComputerVision.LocalServer package is installed in your project. When Local Server is enabled, the server value is over-written. However, the Local Server is not available in cross-platform projects.

    • Visibility check - Checks whether the UI element is visible or not. You can choose one of three options from the drop-down menu:
      • None - Does not check for visibility.
      • Interactive (for Fuzzy Selector) - Default option. Checks if the element is potentially visible, ignoring page scroll and obstructions by other apps, or the fact that the application is minimized. This check is useful when trying to ensure that you are not targeting invisible elements that exist in the DOM but are hidden.
      • Fully visible - Checks if the UI element is visible or not.
    • Wait for page load - Before performing the action, wait for the application to become ready to accept input. You can choose one of three options from the drop-down menu:
      • None - Does not wait for the target to be ready.
      • Interactive - Waits until only a part of the app is loaded.
      • Complete - Waits for the entire app to be loaded.
    • Window selector (Application instance) - The selector that is used for the application window. Only applicable when the window attach mode is set to Application instance.
  • Text - The text to enter. You can add special keys to the text from the drop-down list in the body of the activity. If this field is configured, the Secure text field is cleared. The maximum string length for this field is 65536 characters.
  • Verify execution - At runtime, verifies if the action performed by the activity was correct. This is done either by verifying if the text specified in the Expected text property is found in the indicated UI element after the activity is executed, or by indicating an element that should appear or disappear after the action is performed, which is monitored and verified after the activity is executed. This feature can be enabled from the Project Settings, or from the body of the activity, by selecting Add Auto-Verification from the context menu.

    • Display name - The display name of the verification action. This field is autofilled based on the verification action and element you have chosen. Once Verify execution is set up, this display name becomes visible in the activity card.
    • Expected text - The text that is expected to be typed in the specified text field. This field is optional. This field supports only strings and String variables.
    • Retry - When selected, the action is retried for the duration of the activity timeout, if the expected outcome was not achieved. By default, this check box is selected.
    • Target - This target is used to indicate the element that you want to verify at runtime. For more information on the property fields that can be expanded under this property, see the Target property above, as the functionality of the properties is the same.
    • Timeout - The amount of time (in seconds) to wait for the verification element to appear, disappear, or change. If the Retry checkbox is selected, the action is performed again, followed by the verification, for the duration specified in the Timeout property of the activity. The default value is 10 seconds.
    • Verify element - Defines what change you want to check the verification target for. The available options are:
      • Appeared - Checks whether the element appears.
      • Disappeared - Check whether the element disappears.
      • Text Changed - Checks whether there are any changes in the text of the element.
      • Visually Changed - Checks whether there are any image changes of the element.

Input/Output Element

  • Input element - The UI element on which the activity is executed, stored in an UIElement object. This field supports only UIElement objects. This object can be obtained from the Output Element property field of other UI Automation activities.
  • Output element - Outputs a target UI Element and stores it in a UIElement object, which can be further used to target the same element with other activities.

Misc

  • Private - If selected, the values of variables and arguments are no longer logged at Verbose level. This field supports only Boolean (True, False) values. The default value is False.

Options

  • Alter disabled element - If selected, the activity executes the action even if the specified UI element is disabled. This field only supports Boolean values (True, False). The default value is False.

    This property does not apply if the Input Mode property is set to Hardware Events.

  • Input mode - Select which method the Robot should use to interact with the target application:

    • Same as App/Browser - Use the same input mode as the Use Application/Browser activity.

      This is the default selection.

    • Hardware Events - Uses the hardware driver to perform the action. This is the slowest method, it cannot work in the background, but it is compatible with all desktop apps.

    • Simulate - Simulates using accessibility APIs. Recommended for browsers, Java based applications, SAP. Usually more reliable than Hardware Events. Sends all text in a single action. Works even if target app is not in focus. Please test if your target application UI element supports this.

      In the Properties panel, the button next to the Input Mode property field automatically tests and selects the right input mode for the action you are performing. Using this feature, the text is typed into the target field with all of the available input methods, and the one that performs the best is automatically chosen.

      The properties Activate, Click before typing, Delay between keys, and Empty field cannot be used with the Simulate input mode.

    • Chromium API - Performs actions using debugger APIs. Works only for Chromium elements. Sends all text in one go. Works even if target app is not in focus. For more details, check out this page.

    • Window Messages - Simulate using Win32 messages. Recommended for desktop apps. Usually more reliable than Hardware Events. Sends all text in a single action. Works even if target app is not in focus. Please test if your target application UI element supports this.

Options - Hardware Events / Chromium API

  • Activate - Bring the UI element to the foreground and activate it before clicking it. If is not selected, the activity types into the current active window. This field only supports Boolean values (True, False). The default value is True.
  • Click before typing - See Click before typing in the Designer panel.
  • Delay between keys - Delay (in seconds) between consecutive keystrokes. The default value is 0.02 seconds. The maximum value is 1 second.
  • Empty field - See Empty field before typing in the Designer panel.

Options - Simulate

  • Deselect at end - This check box can only be used when the Input Mode property is set to Simulate and is selected by default. Some target applications do not register a type action unless a Complete event is also sent alongside the action. Selecting this check box adds a Complete event after the text entry, in order to register the action correctly. If this check box is cleared, the Complete event is not sent to the target application. By default, this check box is selected.

Cross-platform configuration

  • Indicate target on screen - Indicate the UI element to use as target.

    After you indicate the target, select the plus button to access the following options:

    • Indicate target on screen - Indicate the target again.
    • Edit target - Open the selection mode to configure the target.
  • Type this - The text to enter. You can add special keys from the Text Builder.

Additional options

Timings

  • Delay before - Delay (in seconds) between the time the previous activity is completed and the time this activity begins performing any operations. The default value is 0.2 seconds. Adding a delay between activities ensures that one activity has enough time to complete before the next activity begins.

  • Delay after - Delay (in seconds) between the time this activity is completed and the time the next activity begins any operations. The default value is 0.3 seconds. Adding a delay between activities ensures that one activity has enough time to complete before the next activity begins.

  • Timeout - Specify the amount of time (in seconds) to wait for the activity to be executed before throwing an error. The default value is 30 seconds.

  • Continue on error - 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.

Options

  • Empty field - Select whether to delete the existing content in the field before typing the text, and how to empty the field. Fields are emptied by sending a combination of keystrokes that differs between fields with a single line and fields with multiple lines. Make sure to select the right option depending on the indicated field. The options are:
    • None - Do not delete the existing content.
    • Single line (End, Shift+Home, Del) - Delete the content from a text field with a single line. This is the default option.
    • Multi line (Ctrl+A, Del) - Delete the content from a text field with multiple lines.

  • Click before typing - Select whether to click the specified UI element before typing the text, and the type of click to perform. The options are None (do not click), Single (execute a single click), or Double (execute a double click). The default option is Single.
  • Activate - If selected, the specified UI element is brought to the foreground and activated before the text is typed in. If is not selected, the activity types into the current active window. This field only supports Boolean values (True, False). The default value is True.
  • Deselect at end - Adds a Complete event after the text entry to trigger certain UI responses in web browsers.
  • Input mode - Select which method the Robot should use to interact with the target application:

    • Same as Browser - User the Input mode setting from the parent Use Browser activity. This is the default option.
    • Chromium API - Performs actions using debugger APIs. Works for Chrome and Edge elements only. Sends all text in one go. Works if the target app is not in focus.
    • Simulate - Simulates the click using accesibility APIs. Works for browsers. Sends all text in one go. This input method works in the background (even if the target app is not in focus).

Input/Output

  • Input element - The UI element on which the activity is executed, stored in an UIElement object. This field supports only UIElement objects. This object can be obtained from the Output Element property field of other UI Automation activities.
  • Output element - Outputs a target UI Element and stores it in a UIElement object, which can be further used to target the same element with other activities.

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.