A container that searches for a UI element by using other UI elements as anchors. This should be used when a reliable selector is not available.
For reliability reasons, it is recommended to avoid the usage of the
idx attribute in selectors. In such cases, consider adding information about ancestor elements, using relative elements or the Anchor Base activity.
- AnchorPosition - Specifies to which edge of the container the UI element is anchored. The following options are available:
- Left - Searches for the UI element to the right of the container.
- Top - Searches for the UI element at the bottom of the container.
- Right - Searches for the UI element to the left of the container.
- Bottom - Searches for the UI element at the top of the container.
- Auto - If selected, the Bottom case is not considered. Searches for the UI element to the left, right or bottom of the container. The closest one is selected. If multiple elements are found at equal distance from the anchor, the target is selected in this order: Right, Left, Bottom.
- DisplayName - The display name of the activity.
- ContinueOnError - Specifies if the automation should continue even when the activity throws an error. This field only supports Boolean values (True, False). The default value is False. As a result, if the field is blank and an error is thrown, the execution of the project stops. If the value is set to True, the execution of the project continues regardless of any error.
If this activity is included in Try Catch and the value of the ContinueOnError property is True, no error is caught when the project is executed.
- Private - If selected, the values of variables and arguments are no longer logged at Verbose level.
Anchors are used when you want to interact with an element that has an unstable selector. In this example, the workflow writes a particular text string in a field which changes its position every time the www.rpachallenge.com web page loads.
The workflow contains the following activities:
- Open Browser - Opens www.rpachallenge.com in Internet Explorer.
- Anchor Base - Identifies the target field and writes the sample text:
- Left side - The Find Element activity identifies the First Name field.
- Right side - The Type Into activity writes "Example" in the First Name field.
Updated 6 months ago