- 1 Type Into activity
- 2 Indicate on screen
- 3 Properties
- 3.0.1 ContinueOnError
- 3.0.2 DelayAfter and DelayBefore
- 3.0.3 DisplayName
- 3.0.4 ClippingRegion
- 3.0.5 Element
- 3.0.6 Selector
- 3.0.7 Timeout (milliseconds)
- 3.0.8 WaitForReady
- 3.0.9 Text
- 3.0.10 Private
- 3.0.11 Activate
- 3.0.12 AlterifDisabled
- 3.0.13 ClickBeforeTyping
- 3.0.14 DelayBetweenKeys
- 3.0.15 EmptyField
- 3.0.16 SendWindowMessages
- 3.0.17 SimulateType
- 4 Practical example
Type Into activity
We use the ‘Type Into’ activity in UiPath to send keystrokes to UI elements. Whether that is Windows desktop applications or web applications, the intuition is the same. We can even send special keys like ‘Enter’, ‘Ctrl’ or ‘Space’ by clicking the ‘+’ in the lower right corner of the ‘Type Into’ activity (see Fig. 1.1).
Indicate on screen
To specify where we want to send our keystrokes to, we click ‘Indicate on screen’ (see Fig. 2.1).
Having clicked the ‘Indicate on-screen,’ we can now select all the UI elements. Try it yourself and look for the yellow border around the UI elements. In Fig. 2.2, we are selecting the Google logo.
Since we want to do a google search, we select the search field (see Fig 2.3) and press the left mouse key.
In the ‘Text must be quoted’ we specify our text we want to type in. In our case, we want to do a Google search for cute cats. Remember to put your string in quotation marks (see Fig. 2.4) or create a string variable.
Doing a Google search requires either a click on the search button or an ‘Enter’ click on the keyboard. We can easily send the Enter key (or any other Special Key like ‘Ctrl’ or ‘F1) by clicking the ‘+’ icon in the bottom right of the ‘Type Into’ activity and select ‘Enter’ in the drop-down menu (see Fig. 2.5).
The mission is almost complete (see Fig. 2.6). This ‘Type Into’ activity will do a Google Search on “Cute cats” and click ‘Enter’. You can try it, but I will save you for cute cat pictures on this site (although I like animals).
To change the properties of the ‘Type Into’ activity, mark the activity, so it becomes blue, and in the upper right corner, the properties will open (see Fig. 3.1).
If ‘True’ the workflow will run even when encountering an error, e.g. the Google page is not present. Default is ‘False’, meaning the workflow will stop when facing an error.
DelayAfter and DelayBefore
Specify the delay before and after the ‘Type Into’ is performed in milliseconds. Default is 300 for DelayAfter and 200 for DelayBefore and do remember that 1000 milliseconds equals 1 second.
Instead of the generic name ‘Type Into ‘Input”, we can give it a more appropriate name, e.g., ‘Type Into ‘Google Search Field”.
The ClippingRegion property is something we, as RPA developers, very rarely touch. The clipping region is the red box around our selected UI element (see Fig. 2.4). If we, for some reason, want to move this selection, we can define coordinates to offset this selection. This is useful when we want to perform our action (here typing in) in some part of the element, e.g., when a selector doesn’t exist for that offset region.
If you have another previous activity that gives you a UiElement variable, you can use it here. A UiElement just defines the address of the element (which we manually did above). You can’t use this property with the Selector property, since that will give UiPath two addresses for your UI element.
A selector is the address of the UI element (e.g. the Google Search field). It’s an XML fragment. If you use the ‘Indicate on screen’, this is created automatically (see Fig. 2.1).
Specify how many milliseconds UiPath should be looking for the UI element before an error is thrown. Default is 30.000 milliseonds (= 30 seconds).
This property states whether you want to wait for the target to become ready before performing the actions. None: Does not wait. Interactive: Wait for a part of the target to become ready. Complete: Waits for all the target application elements (here the browser) to become ready before acting. Default is complete.
The actual text to be written with the ‘Type Into’. Do note that this is the same as in the activity itself (you can define the text in both places).
With this property ticked on, we can specify not to log variables and Verbose level arguments in Orchestrator and Studio.
If ticked the UI element is selected and bought to the foreground.
The ‘Type Into’ is performmed even if the specified UI element (here the Google search field) can’t be found.
If ticked, the specified UI element is clicked before typing. Sometimes we use this to make our solution more robust (to be sure we are in the selected UI element).
Defines the delay in milliseconds between each keystroke. More delay = more robust but slower robot. Default is 10 milliseconds.
When ticked it will empty the field for previous text, e.g. if we want to do a search for “Cute dogs” after our “Cute cats” search (we thereby avoid having the search to be: “Cute catsCute dogs”.
If selected, the ‘Type Into’ is executed by sending a specific message to the target application. This input method can work in the background and is compatible with most desktop apps. Faster than the default, but not as fast as ‘SimulateType’. Support Special Keys, e.g., the “[k(enter)]”.
The fastest of the input methods and works in the background. It doesn’t support Special Keys, e.g., the “[k(enter)]”. Use this per default if you don’t need the special keys.
See how the ‘Type Into’ is used in this use case, where we implement it in a browser automation.