Using my sequence for next item

Looking to use my sequence for multiple lines in my browser application. The sequence itself works fine and goes through the first object without any issues, however I can not seem to make it run again through the second line …

The records through which I want to loop are CLICKABLE only and not formatted, so the only way is by detecting whether there’s a possibility to click or not and then continue.

LoopUIPATH

You can use the counter in the selector of the element that is to be clicked

This sounds like you make him click the same element every single time? But he needs to click the element below the one that he previously clicked and filled out.

Avoid using a While loop at all possible! :smiley:

One suggestion is to use Find Children activity, because then you can filter to the elements within the table by the ‘A’ tag. Then, just run it in a For each. - Since you would be looping elements, the click action is simple.

However, it’s been a long time since I’ve used that method.

Another suggestion is to extract the table using Data Scraping. This will give you a Data Table, and you can even get the urls for each item. Then, you can simply use a For each over the table for only the items with urls.

If the URL option doesn’t work, you can always use the ‘Item Number’ instead as part of the selector, and skip the ‘A’ tags that can’t be found (use Element Exists before each click, so you can check if it exists)

To use the item number, you could opt to actually use the itemRow. Many times, using UiExplorer, you can find the itemRow attribute. Then, you can use the value from the ‘Item Number’ column or the index of the ForEach as a variable in the selector:
image

I hope this makes sense.

Regards.

Hi Clayton,

Thank you very much for your answer. However the elements are not in a dropdown table so the Find Children method seems inapproriate. I also need to take into account that sometimes I would like to hover over 5 elements but other times 30+ items. It would be very useful to be able to quickly adapt according to the specific amount of times I would need the bot to go over.

The Find Children should work, but it’s not something I would highly recommend just because it’s more difficult to understand sometimes. The Find Children essentially gets all elements inside a specific tag filtered by specific attributes.

But, I do think using Data Scraping is a good option. It will give you all the rows that you want to interact with. This will be the most dynamic approach, so if there are 5 rows or 30, it will work efficiently.

Once you have a Data Table after scraping, you can run that through a ForEach.

From there, you have a few methods you can use to click on each record. As mentioned, you can use the Item Number during the loop to interact with the record that has that Item Number in its selector.

Aside from that suggestion, we really can’t help that much without interacting with the application ourself. This is because the way to interact with applications can be different from one to another, so it’s difficult to make suggestions on this.

If you can’t figure out my suggested method to click on the records, feel free to post samples of the elements from UiExplorer to show all the attributes and also some of the code you are attempting to use. :+1:

Regards.

Hi Clayton,

As you can see in the second ss, the field can be indicated however my current attempt does not work + an additional issue seems to be that the fields (e.g. item number, commedity, etc.) are all individual clickable as well. Does uipath identify each cell as a child?


Have you tried using Data Scraping to extract the rows into structured dataset, which then you can loop over each row and use its Item Number? If this is possible, it might be easier to get working.

If you choose to use Find Children, I suggest setting the TypeArgument to UiElement, and using a Write Line first to verify each element, maybe with "ele.Selector.Text", or using the Highlight activity you can visually see which element it sees. You will want to filter the ‘Find Children’ by the ‘A’ tag and ‘text’ equals “record1” (but I’m no expert on filtering with that activity but there are examples on the forums)

Anyway, it’s up to you which method you use. This also depends on the application, which I have not looked at, so I am unsure with how to best interact with it.