Please help advise how to set loop

Main.xaml (12.7 KB)

i want to download pdf file from invoice extraction from this site.

i have created this xaml. pls run this bot and let me where i am going wrong.

Hi @taruna.mehra ,

After you click the Invoice Extract button, the control transfers to a url:

But the selector for the second activity shows a different wildcard selector that does not match the URL of the page you are on.


** will not work on a page with URL

I hope this is where you are running into issues?

If yes, then this is how the selector must look like. Note that you are doing all of this work inside the Open Window action whose url is But, the actual window you are operating has a different URL. You can’t change the URL (unless you write a full selector expression). Instead, if you click on the first date value, your selector will change to something like this:


Note that the page URL has been replaced by the page title.
Second, the tableRow attribute is not automatically selected , you have to include it by opening the selector in Ui Explorer.

The next step would be for you to parameterize the tableCol and tableRow so that you can extract each date value and perform the business logic.

But where are you populating the VarDate variable that you are using in the third step?
If I look at the click activity above, its output is empty. You have to get the value into varDate before you can use it.

Main_TarunaMehra.xaml (12.9 KB)


1 Like

That’s incorrect use of selectors. This should all be inside an Open Browser or Attach Browser (or Use App/Browser if modern), and that browser should be stored in a variable not directly referenced with a selector for each activity.

That is another option too.

As for the variables, our practice has been to parameterize our selectors and feed them to our automations. Thus far it hasn’t given up on us.

We have also parameterized our Browsers so that end users can switch their automations across 3 major browsers (Chrome, New Edge and FF).

I’m just looking at the scope of @taruna.mehra immediate problem. There is really no end to how versatile she can make it once the core issue is resolved.


Hi all I am new to UiPath and learning diff thru assignments. I understand the logic which I have learnt in my classes however when it comes to applying to diff assignment I get confused. That’s why I have made multiple queries on this loop issue. I will share my xaml which I have created and still unable to run loop. Would appreciate if I can get some solution to it.