Anchor base failed to identify correct Click image to the right

I am trying to automate the search for the specific tag/text on the web page and click to the “Update” button to the right.
In this example, I am searching for Lease Vendor tag and clicking to Update (Pencil) Image to the right.
I have created the Anchor base with the activities Find Element (Lease Vendor) and Click Image (Pencil button).
The robot works, but it fails to click the correct Update button to the right from Lease Vendor - instead it clicks Update from Label Holder, which is one line below.
I’ve tried to set AnchorPosition parameter to Auto or Left and it still doesn’t click on the correct image.
I appreciate any suggestions how to tune this robot.

Hi @Andriy_Kukharuk,

Can you send the selector for the activity?

Also i suggest to check if the selector changes when you refresh the page

have a look here as the case is quite similar

Thank you for the response. I’ve checked the selector on ‘Find Element’ within Anchor base and it seems invalid - please see the screenshot.

I’ve also examined the element Lease Vendor on the page and there is a following tag in DOM explorer:
Lease Vendor
This web page is dynamically generated from the database and the same element (Lease Vendor) can appear at the different rows for the different sessions, there appears to be no clear sort rule.

Here is the tag from DOM Explorer:

So, it seems that the id is linked to the Row, not to the name.

Can you use UiExplorer to see if there is the propriety “aaname=‘Lease Vendor’”?

If so, changing the anchor’s selector to point ONLY on the aaname should fix

Keep me posted

I’ve checked the property in Ui Explorer and there is the property aaname=‘Lease Vendor’. I’ve changed the selector only to use aaname, but it was displayed, as not valid, after repair it added idx=3 to the tag.

I’ve re-tested the robot, but it still doesn’t work, as expected - it opened Edit dialog for the item, which is 2 lines above ‘Lease Vendor’. I’ve tested it with AnchorPosition = Auto.

Also re-tested with AnchorPosition.Left - the same result.

I’ve replaced ‘Find Element’ activity with 'Find Text Position" and specified “Lease Vendor” as the search text and, amazingly, it worked. Now robot opens correct Edit link for “Lease Vendor”. I’ve successfully tested it with AnchorPosition.Left .

1 Like