Downloading files from table in a website

Hello UiPath Community, I’m new to UiPath and I’m looking for suggestions on how to download files from a table in a website:-

To download the files from this table, I would have to click the document image and the “Save as” pop up will appear where I would save the document in their respective folders. I note a couple of complexities with this table which makes it challenging for me to build the bot:-

  1. The table is dynamic, it can have different number of lines depending on my input from the previous page
  2. Some of these lines do not contain documents (see the last line in the picture above)
  3. Some of these lines have more than 1 document within them, when this is the case, a pop up like this would appear:
    image
    The documents will then be downloaded by clicking the document image.
  4. I have tried Data Scraping to extract the URL to download the document, however, the URL could not be scraped.

Appreciate your input or suggestions on how I can build a bot to:-

  1. Download the documents for each line of the dynamic table
  2. For lines with more than 1 document, download the document from the pop up window
  3. For lines without any documents, skip the line and move on to the next line
  4. Save the downloaded documents into files which are named based on their Reference ID in the Reference column in the table

Thank you and stay safe!

Hi schee6,

Could you send screen shot what edit selector window show after click activity clicks image
?
We could compare few of them . In best case scenerio, there is some sort of index id number like this image

If you find something like this. you can make a loop which will put there increased number for each step

Hello Mateusz, thanks for replying me! Here you go:

There is no index id number… However I note that the “ctl02” increases for each line. So the first line is ctl02, the second line would be ctl03.

Hi @schee6,

Take a look at the solution frim @Hiba_B in this recent thread. The approach should be similar.
How To Download File in front of List of expressions - Help / Studio - UiPath Community Forum

2 Likes

Hi Jeevith, thanks so much for directing me, I’ll look into this thread!

Great! We are at home :smiley: . I think you can try to put number there with use of an regex

RegEx Search (uipath.com)

Hi
Did we try with FIND CHILDREN activity and GET ATTRIBUTE activity with which we can get the url from atttibute values

@schee6

Hello, I understand that we have to select the whole table while using the FIND CHILDREN activity, however, I’m not able to select the whole table… Is there any way to go about this?

I also tried using GET ATTRIBUTE on a single line and I was not able to get the URL as well.

Hello Mateusz, thanks again for your reply! I was wondering if you could elaborate a bit on how I can try using the RegEx search for this case? Apologies as I’m quite new to this… :sweat_smile:

Hello schee6,

In you example I think regex might not work, sorry for confusion, I’v expected something different. However you can “inject” string in selectors f.e like this

And make a loop in order to “rotate” those on page

idFull would be idHead+lineNumber.ToString+idTail

Sorry to send you this like that, but somehow I cannot add file. Let me know if something is unclear :slight_smile:

1 Like

Thank you again for this! I shall try this :slight_smile: