The Anchor Base feature is a friendly little UiPath Studio activity that can help harden your screen scraping and text processing applications by eliminating a dependency on very fragile UiPath Selectors.
Overcome Selector Fragility
Any time the layout of an HTML page, or the structure of a PDF file changes, a hard-coded selector can fail. This is what people mean when they say selectors are fragile. With this UiPath Anchor Base Example, you’ll learn how to select a UI element or text element not based on its internal ID or selector property, but instead by its relative position on a page.
Here are the steps you need to follow to use the UiPath Anchor Base Activity:
- Ensure the PDF of HTML page resource to anchor is accessible to your UiPath Project
- Drag an Anchor Base onto your sequence
- Use the Find Element or Find Image activity to find your relative positioning target
- Specify the relative AnchorPosition of the found element to the target element
- Add the activities to be performed in the Drop Action Activity Here section