SetText

The SetText component enables the user to set text in text boxes and dropdowns within applications, check boxes or radio button controls. SetText component uses Inter Process Communication (IPC) to interact with application controls. If for some reason Set Text component fails to Set Text, try the Send Keys component.

Screenshot

Ports

The SetText component exposes Control In and Control Out ports and a Data In port by default.

Port Description
Control In Must be connected to the Control Out port of one or more components.
Control Out Can be connected to the Control In port of another component, or the default end component.
Data In Specifies the text to be entered in a particular application (String).

Properties

To edit the properties of the SetText component, user has to click the Properties window and edit the required property. This is necessary to select the action to be performed with the SetText component.

The user can edit the following properties:

Property Description
Search Search for the respective property.
Delay After Execution Specifies the wait time (in seconds) after the action is executed.
Delay Before Execution Specifies the wait time (in seconds) before the action is executed.
Name Specifies the name for the SetText component. The user should always set the name to match the application field they are interacting with.
Click X Specifies the location of the Click action on the X-axis.
Click Y Specifies the location of the Click action on the Y-axis.
Search As Gray Scale Image Defines the selected area as a gray scale image.
Threshold Specifies the image matching accuracy before performing the SetText operation.The value of 1 defines a 100% match while 0.5 defines 50% match. The default value is 0.9 or 90% match.
Max Wait Time in Seconds Specifies the wait time (in seconds) for the application to appear on the screen. The default value is set to 30 seconds.
Wait After Image Found Specifies the wait time (in seconds) after the image is found.
Wait For Create Specifies if the SetText component must wait for the application to appear on the screen. The default value is True.

Example

Let us take an example of using the SetText functionality to append text to a text file.

Screenshot

To use the SetText component:

  1. In the Toolbox, expand Actions.

  2. Drag the SetText component and drop it on the Design surface.

  3. Double click on the SetText component to add multiple images. Screenshot

  4. To select the region, click .Screenshot.Then Press CTRL+SHIFT for selection message is displayed.

  5. Press CTRL+SHIFT. The mouse pointer becomes a crosshair.

  6. If the First captured image is not displayed on the screen then it searches for the next captured image. Click Screenshot sign to add next image.

  7. The user has to select the region of the notepad where they want the text to be appended. The selected region is displayed in the SetText component.

  8. To add text into the notepad, add the Variable component.

  9. To add the Variable component:

    • In the Toolbox, expand General.

    • Drag the Variable component and drop it on the Design surface.

    • Double-click the Variable component, and enter the text append to notepad.

  10. Connect:

    • It is the control ports of all components.

    • The Control Out port of the Variable component with the Control In port of the SetText component.

    • The Control Out port of the SetText component with the default END component.

  11. In the toolbar, click Run.