Looping through a clickable UI (non browser)

Hi all,

Been using UIPath to automate data entry into a fairly ancient Windows app, with good success overall. Struggling with the following task however…

I need to loop through a series of clickable links in the app (again, custom app, not browser) and amend the Trips that are listed in the window (see picture, red arrow). The number of links is variable. Once I click on the Trip link, some data entry occurs in a pop up window, then the app returns to the original window and I need UIPath to click on the next Trip link, if there is one, and repeat the task until all Trip links have been processed.

I am completely stumped how to go about it! Any idea?



1 Like

Hey @vincent.schoenfeld

Were you able to get the selector for the link, just check for one link first please…


Hello @vincent.schoenfeld

Can you inspect on any one of the link and share the selector here.

There should be some attribute like rownum or idx which gives the line number of the link. Plz check in ui explorer and share


Can you get an idea of ±, on average, how many links there will be?
Share the selector of one of the links.
If you have index, you can create a while in which you can increment the index value.


Yes I can actually get UIPath to find the link, but the issue is that the links are not always separated by the same number of lines, and also the number of links is not constant. If it’s more than the window can hold, I have the hurdle of having to scroll down to reach the next bunch of links.

I did look at the UI targetting info to see if the links had a unique name I could use (e.g. increasing numbers), but sadly those links are all named the same. These are two pics of the target info for two different links. Can’t see a difference…

I am limiting the number of links to four as that would fit in the window and it mostly works, but it is based on exact geometrical location of the links on the window. There can be up to 30 links, which is why I’d rather not do it 4 links at a time. But even that is not reliable, as once in a while the horizontal distance between two links changes by one line, and so the position of that links and any others below is no longer the same.

Thanks for your help everyone


Hi @vincent.schoenfeld,

Have you tried introducing the column name with the anchor? Will the value always come under ‘Trip’ ?


Thanks @muhammedyuzuak

Let me show you how I targeted it so far, maybe it’ll give you ideas! This is a pic of how the target/anchors are set (I used Trip column head, as you suggested, as one of the anchors). BTW, to achieve selecting Trip and End Of Reports as anchors, I had to tick the Enable Native Text option (I can’t find another way to select things like Trip as an anchor otherwise):

As you can see, there are two lines between each trip. This is the case for trips that already have crew allocated .And the robot works fine for screens that have that 2 line spacing.

However… there are case where crews have not yet been allocated to a trip, in which case they use a default blank crew member, but this results as a single line spacing between trips:

As you can see from the position of the cursor, UIPath is trying to find a link one line below where the link for the trip is, because of the single vs double spacing issue.

Hope you can help! I’m lost :thinking:


FYI I have tried to improve the targetting using different types of anchors (see next two pics), but they all fail when the spacing changes…

Starting to think there might not be a solution!

Hi @vincent.schoenfeld,

I don’t want all this hard work to go to waste, but problems with selectors are remotely difficult to solve. It has to be tested dozens of times.

The advice that can be given here is limited.

@muhammedyuzuak I’m way past a dozen times :wink: I appreciate you trying to help. I’ll keep trying! I think the I might be able to make it work with a double IF statement and using the Application State activity to figure out if it’s a single or double line between the links. Fingers crossed…