UiPath Activities

The UiPath Activities Guide

Manage Mouse Activated Actions

The example below explains how to automate the use of the mouse on a website by using activities like OCR Text Exists, Get OCR Text, or Hover OCR Text. 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.
  2. Drag a Sequence container in the Workflow Designer.
    • Create the following variable:
Variable Name
Variable Type
Default Value

ocrTextFound

Boolean

-

  1. Drag an Open Browser activity inside the Sequence container.
    • In the Properties panel, select the IE option from the BrowerType drop-down list.
    • Add the website path in the Url field, in this case, "https://google.com".
    • Select the check box for the NewSession option. This starts a new session of the selected browser.
  2. Place a Type Into activity below the Open Browser activity.
    • Inside the activity, click the Indicate on screen option. The GIF below shows all the steps you need to follow:
      1
    • In the Properties panel, add the value "News" in the Text field.
    • Select the check box for the Simulate Type option. This simulates, in the background, the type by using the technology of the target application.
  3. Drag an OCR Text Exists activity below the Type Into activity.
    • Inside the activity, click the Indicate on screen option. The GIF below shows all the steps you need to follow:
      2
    • In the Properties panel, add the value "Lucky" in the Text field.
    • Add the variable ocrTextFound in the Exists field.
  4. Place a Tesseract OCR inside the OCR Text Exists activity.
  5. Drag an If activity below the OCR Text Exists activity.
    • Add the variable ocrTextFound in the Condition field.
  6. Place a Hover OCR Text inside the Then container of the If activity.
    • Inside the activity, click the Indicate on screen option. The GIF below shows all the steps you need to follow:
      3
    • Add the value "Lucky" in the Text field.
  7. Place a Tesseract OCR inside the Hover OCR Text activity.
  8. Drag a Click activity below the Hover OCR Text activity.
    • Inside the activity, click the Indicate on screen option. The GIF below shows all the steps you need to follow:
      4
    • In the Properties panel, select the check box for the SendWindowMessages option for executing the click action by sending a specific message to the target application.
  9. Drag a Click OCR text activity inside the Else field of the If activity.
    • Inside the activity, click the Indicate on screen option. The GIF below shows all the steps you need to follow:
      5
    • In the Properties panel, add the value "Search" in the Text field.
    • Select the check box for the SendWindowMessages option for executing the click ocr text action by sending a specific message to the target application.
  10. Place a Tesseract OCR inside the Hover OCR Text activity.
  11. Run the process. A new web browser instance opens and initiates a search after the specified word.

Updated about a month ago


Manage Mouse Activated Actions


Suggested Edits are limited on API Reference Pages

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