Subscribe

UiPath StudioX

The UiPath StudioX Guide

UI Automation

UI automation refers to the automation of interactions with elements in the graphical user interfaces of applications and web pages, be they windows, check boxes, text boxes, drop-down lists, and so on. Knowing how to interact with them enables you to implement UI automation much faster and easier. With StudioX, you can create automations with UI elements from most applications.

All interactions with the UI can be split into input (sending or adding something to the application) and output (getting something from the application). Clicking a button and typing text in a text box are examples of input actions. Getting the text from a browser page is an example of an output action.

StudioX comes with activities that help you automate most common UI interactions.

See the tutorials in this section to learn how to work with UI automation.

If you want to find out more about UI automation activities, this section also contains detailed descriptions for each activity.

About Targets

When configuring a UI automation activity, it is important to identify the target, the UI element you want to interact with, in other words to tell StudioX which button to click, which text box to type into, or which part of a web page to copy text from.

Indicating a Target

In most cases, all you have to do to indicate the target is point to it on your screen and click:

  1. Start by clicking Indicate Target in a UI automation activity.
  2. As you move the mouse, StudioX highlights all the elements it recognizes on your screen. If the target element is not visible on your screen and you need more time to get to it, you can press F2 on your keyboard to add a delay.
  3. Place the mouse pointer on the desired element, make sure it is highlighted, and then click it.
    The target is configured and the activity displays a screenshot that shows the target.

Depending on the situation, an anchor may also be added for certain targets. An anchor is another element in the user interface relative to which to identify the location of a target. For example, the label of a text box can be the anchor that helps identify the location of the text box. Anchors are useful when the target element is not unique. When you first indicate a target, StudioX detects if an anchor is needed and either automatically adds an anchor or prompts you to select one. You can also add an anchor or configure an automatically generated one after you have indicated the target from the Configure Target window. If an anchor is added for an activity, it is identified by a screenshot that appears in the body of the activity under Find this.

Configuring a Target

Some targets may require additional tweaking. If the target of a UI automation activity is not identified properly when you execute a project, click the Options Options button button in the activity, and then select Configure Target. This opens the Configure Target window with advanced settings for the methods that are used to identify the target element:

  • Selector - An XML fragment used to store the attributes of an element and its parent elements.
  • Image - An image in the window (for example, an icon or a button) relative to which the location of the element can be identified.
  • Text - A text in the window (for example, a label) relative to which the location of the element can be identified.

If an anchor exists, the same methods are also displayed for the anchor. You can disable an anchor by clearing the Enable this anchor to help find the target check box, or delete it by clicking delete_anchor on the anchor tab. If an anchor does not exist, you can click the Add Anchor button to add one.

When you click Indicate for a target or anchor to indicate the element on your screen, the selector is automatically generated, as are the image and text, if applicable.

You can also manually configure the methods:

  • Enable or disable a method by selecting or clearing the check box next to the method name.
  • Edit the selector in the corresponding text box, or click Open in Editor to configure it in the UI Explorer, an advanced editor for selectors.
  • Change the image by clicking select_image and then selecting with your mouse the region of the window to use as the image.
  • Edit the text in the corresponding text box.

To verify the status of the target, click the Validate button in the lower-right side of the Configure Target window. This checks the validity of the selector definition and the visibility of the target element on the screen.

Updated 3 years ago


UI Automation


Suggested Edits are limited on API Reference Pages

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