Targeting Methods in UiPath RPA

What's Target?

A target refers to a specific UI element that we want to interact with. It could be any component on the user interface, like a button, textbox, or dropdown list.

For example, if we have a login form, the "Submit" button and the "Username" and "Password" textboxes would be considered targets.

To ensure accurate identification of targets, we can use an anchor.

An anchor is an additional UI element that helps in identifying the target. Anchors are particularly useful when potential conflicts are detected in the selection window. By incorporating multiple anchors, we enhance the reliability and accuracy of our automation.

When working with modern UI automation activities, an anchor is automatically selected for you. However, you can also manually configure the anchor selection if needed. It's important to note that you can add up to three anchors to a single target, maximizing the reliability of your automation.

Targeting methods help identify the correct target element. Modern UI Automation activities use multiple targeting methods to identify the UI Element you want the process to interact with.

The key targeting methods are:

  • Strict Selectors
  • Fuzzy Selectors
  • Image

Strict Selectors use XML fragments to identify user interface elements based on their attributes. They require an exact match to the address and attributes of the element, providing precise targeting. 


Fuzzy Selectors enable the identification of elements based on patterns or partial matches, allowing for more flexibility. They validate selectors using multiple attributes, accommodating changes during the automation process.


Computer Vision enhances targeting: when the driver fails to 'see' some UI elements, Computer Vision can enable the UI automation. So, it increases reliability and resilience to change in UI-based automations and it is a powerful fallback for the other targeting methods.
Image Selection method reads the array of pixels in a visible region of the application window to identify if it matches the target array. It's useful when other targeting methods can't be applied or in virtual machine environments.

Window selector targets the entire window or application rather than specific windows within it. It's used when automating UI interactions at the application level. The Window Selector option is available in the "Use Application or Browser" activity when the "Window Attach Mode" property isn't set to "Single window."

Unified Targeting Method

The Unified Target method, a modern solution for UI automation, simplifies the interaction with user interfaces by incorporating various technologies and methods like Selectors, Fuzzy Selectors, and Images to identify UI elements.

By using a unified targeting method, the different methods within it complement and support each other, enhancing the reliability of UI automation. This means that even if one method encounters difficulties in selecting a UI element, other methods can step in to overcome the obstacle.

Key advantages of using the Unified Target method

One of the key advantages of using the Unified Targeting method is its versatility and ease of use. It provides a ready-to-use solution that seamlessly integrates into workflows without the need for complex configuration or considering individual method-specific details. This makes it highly convenient and efficient for developers and automation engineers.  

To identify UI elements, the Unified Targeting method uses a combination of UI frameworks.

By default, a proprietary framework is used, but alternative options like AA (Active Accessibility) and UIA (Microsoft UI Automation) are available based on the target application's type.

A Unified Target consists of at least one target, along with optional anchors.

Each UI element is located using a stack of targeting methods, including Strict Selectors, Fuzzy Selectors, and Images.

These targeting methods work redundantly, simultaneously attempting to identify the target element. The first method that successfully finds the target is considered.

To customize the targeting methods used in the Unified Targeting method, you can access the project settings within the UI Automation Modern section. From there, you can configure and adjust the specific targeting methods according to your needs and preferences.

Different sections within the project settings cater to specific types of target applications, allowing for easy configuration.

Now, let's introduce the concept of a Descriptor.

To understand Descriptors, let's consider a practical example of a Type Into activity for the "Cash In" input field. In this case, we want to enter data into the "Cash In" field, which has a corresponding label.

In this scenario, we have an input field labeled "Cash In" where we want to enter data. Additionally, we have an anchor associated with the corresponding label.

The Target here's the input field, and the Anchor is the label.

During runtime, the robot uses three targeting methods, namely Strict Selector, Fuzzy Selector, and Image, to identify the Target (Cash In input field) and the Anchor (Cash In label).

This means there are three targeting methods available to identify the Target and Anchor, resulting in a total of nine possible combinations (3 x 3) of 'Target - Anchor' pairs.

The Target and Anchor pair is known as Descriptor.

Under the hood, the robot generates these nine unique combinations, which are known as Descriptors. Each Descriptor represents a unique combination of the identified Target and Anchor elements using their respective targeting methods.


Generating these Descriptors, the robot establishes a connection between the input field and its associated label.

The robot runs all nine combinations simultaneously, searching for a successful pair without being limited to any specific targeting method. When a matching pair is found, the robot executes the Type Into activity, allowing us to enter the desired input to the "Cash In" field.

The Unified Targeting method employs multiple targeting methods, including Selector, Fuzzy Selector, and Image, to identify and locate UI elements. These methods work in parallel to search for target and anchor elements. The method that successfully identifies the element first is used to create the Descriptor used to identify the UI element.
A descriptor is a unique pair consisting of an anchor element and a target element. It's generated when both the anchor and target are successfully identified using their respective targeting methods.  


Source: UiPath Academy