UiPath Activities

The UiPath Activities Guide

Manage Text Automation

The example below explains how to automate a text received as an input by using activities like Get Full Text, Get Visible Text, and Find Text Position. You can find these activities in the UiPath.UIAutomation.Activities package.

This is how the automation process can be built:

  1. Open Studio and create a new Process.

Note:

Open the Notepad.exe application.

  1. Drag a Sequence container in the Workflow Designer.
    • Create the following variable:
Variable Name
Variable Type
Default Value

question

String

-

  1. Drag an Input Dialog activity inside the Sequence container.
    • In the Properties panel, add the expression "Please ask a 'YES/NO' question" in the Label field.
    • Add the value "Question" in the Title field.
    • Add the variable question in the Result field.
  2. Drag an Open Application activity below the Input Dialog activity.
    • Inside the activity, click the Indicate window on screen option. Now you can select the desired application. The GIF below shows all the steps you need to follow:
      1
  3. Place a Sequence container inside the Open Application activity.
    • Create the following variables:
Variable Name
Variable Type
Default Value

fullText

String

-

visibleText

String

-

visibleInfo

System.Collections.Generic.IEnumerable<UiPath.Core.TextInfo>

-

position

System.Drawqing.Rectangle

-

  1. Drag a Type Into activity inside the Sequence container.
    • Inside the activity, click the Indicate element inside window option. Now you can select the desired application. The GIF below shows all the steps you need to follow:
      2
    • In the Properties panel, add the expression question.ToString + " ----> Yes" in the Text field.
  2. Drag a Get Full Text activity and place it below the Type Into activity.
    • Inside the activity, click the Indicate element inside window option. Now you can select the desired application. The GIF below shows all the steps you need to follow:
      3
    • In the Properties panel, add the variable fullText in the Text field.
  3. Place a Get Visible Text activity underneath the Get Full Text activity.
    • Inside the activity, click the Indicate element inside window option. Now you can select the desired application. The GIF below shows all the steps you need to follow:
      3
    • In the Properties panel, add the variable visibleText in the Text field.
    • Add the variable visibleInfo in the WordsInfo field.
  4. Drag a Get Position activity below the Get Visible Text activity.
    • Inside the activity, click the Indicate element inside window option. Now you can select the desired application. The GIF below shows all the steps you need to follow:
      3
    • In the Properties panel, add the variable position in the Rectangle field.
  5. Place a Message Box activity below the Get Position activity.
    • In the Properties panel, select the Ok option from the Buttons drop-down list.
    • Add the expression "Text information" in the Caption field.
    • Add the expression "The text '" + fullText.ToString +"' is at position" + position.ToString in the Text field.
  6. Run the process. Type a question in the dialog box that is automatically typed into a notepad and then processed. In the end, a message box is displayed with information about the question entered by you.

Updated 2 months ago


Manage Text Automation


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.