UiPath Activities

The UiPath Activities Guide

Find and Manipulate Window Elements

The example below explains how to automate the action of changing the font size in a notepad file. It presents activities such as Find Element, Find Relative Element, Click, Activate, or Set Focus. 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

EditElement

UiPath.Core.UiElement

-

FormatElement

UiPath.Core.UiElement

-

  1. Drag an OpenApplication activity inside the Sequence container.
    • Inside the activity, click the Indicate window on screen option. Then you can select the Notepad window. The GIF below shows all the steps you need to follow:
  1. Drag a Find Element activity below the OpenApplication 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, select the COMPLETE option from the WaitForReady drop-down list.
    • Add the variable EditElement in the FoundElement field.
  2. Place a Find Relative activity below the Find Element activity.
    • In the Properties panel, add the value 20 in the OffsetX field.
    • Select the option TopRight from the Position drop-down list.
    • Add the variable EditElement in the Element field.
    • Add the variable FormatElement in the RelativeElement field.
  3. Place a Click activity below the Find Relative activity.
    • In the Properties panel, add the variable FormatElement in the Element field.
    • Select the None option from the KeyModifiers drop-down list.
  4. Place another Click activity below the first Click activity.
    • Inside the activity, click the Indicate on screen option. The GIF below shows all the steps you need to follow:
      2
  5. Drag an Activate activity below the Click activity.
    • Inside the activity, click the Indicate on screen option. The GIF below shows all the steps you need to follow:
      3
  6. Place a Set Focus activity below the Activate activity.
    • Inside the activity, click the Indicate on screen option, and select the Size menu option. The GIF below shows all the steps you need to follow:
      4
  7. Drag a Send Hotkey activity below the Set Focus activity.
    • In the Key field, type the value down.
    • In the Properties panel, select the check box for the Activate option. This option brings the UI element to the foreground and activates it before the text is written.
    • Select the None option from the KeyModifiers drop-down list.
    • Select the check box for the SpecialKey option. This indicates that you are using a special key in the keyboard shortcut.
  8. Place a Click activity below the Send Hotkey activity.
    • Inside the activity, click the Indicate on screen option. The GIF below shows all the steps you need to follow:
      5
  9. Run the process. The automation opens a new Notepad file, navigates through the menu and changes the font size.

Updated 2 months ago


Find and Manipulate Window Elements


Suggested Edits are limited on API Reference Pages

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