studiox
2023.4
false
UiPath logo, featuring letters U and I in white

StudioX User Guide

Last updated Aug 7, 2024

About Targets and Anchors

A target is a UI element you want to interact with, for example a button to click, a text box to type into, or a part of a web page from which to copy text.

An anchor is another nearby element that helps to uniquely identify the target. When you indicate a target, StudioX tries to identify and automatically select an anchor. You can also manually add up to three anchors.

After a target is selected, you can edit selectors on the spot from the Selector Options window, under the Window selector section. It's also possible to open UIExplorer from here for advanced selector editing.



When to Use an Anchor

Anchors are useful when a target element is not unique. For example, a form in a desktop application typically contains multiple similar text boxes into which to enter various data. The way you identify what data needs to go into each one is by looking at the labels next to them. Similarly, when the label of a text box is added as its anchor, the Robot uses the anchor to identify the text box to type into.

In some scenarios, multiple anchors are required to distinguish a target from other similar elements called duplicates. For example, if a form contains billing address and shipping address sections, the text boxes in them appear twice with the same label, so you need to add both the labels (e.g. "Zip code") and the title of the section (e.g. "Billing address") as anchors to identify the correct one.

  • When to Use an Anchor

Was this page helpful?

Get The Help You Need
Learning RPA - Automation Courses
UiPath Community Forum
Uipath Logo White
Trust and Security
© 2005-2024 UiPath. All rights reserved.