Download Files on a Webpage

I am looping through multiple pages on a website and trying to download all the attachments on the page. Each page has a different number of attachments. I used webscraping to try and get all the URLs and then download them like this video here shows:

The problem with this is that the files are not attached to a link. When I right click on the attachments it does not say Copy Link anywhere.

Is there another way to click on each attachment on the page?

Hello @bfmugri ,

The link to the downloads has been suppressed by the creators of that web application. The reasons can be many. But they sure don’t want these files to be opened in a separate browser window.

So, you may have to slightly change your approach this way.

  1. When you scrape the screen, you get the exact names of the attachments.
  2. When looping through the list of attachment names, you can use these names to create a dynamic selector
  3. Use that dynamic selector to click on the file name directly and start the download
  4. You will have to add a Path Exists activity to check for that file has completed downloading in the \Downloads folder before moving the loop to the next file

I hope this helps

@bfmugri

For the 4th step you can use Wait For Download Activity which is very useful in such scenarios

https://docs.uipath.com/activities/lang-en/docs/get-last-downloaded-file