How to click link on web page and then click the next link?

Dear Team,

Need assistance on " How to click on a link and download a file from the website to the local computer"?

Web links are dynamic and I would like to click on weblinks one by one and save them on my computer or Database?

Since it has confidential information I am unable to give you a flowchart here .

I am posting this request from a mobile device, so please pardon any typos. Looking forward to hearing from you.

Kind regards,


If it is structured data then use Data Scraping to scrape data and will generate output as ‘DataTable’. And then use For Each Row activity to iterate that data table.

Hi @lakshman, Thanks for quick response.

It’s dynamic data table having multiple links, I mean when we click on the link it will open new window and download the pdf bill and it save automatically in “download” folder. But, I wanted this to be automated and save thru UiPath control. Do we have any control like" Click download link on web page and save desired location as per our choice ? Looking forward to hearing from the expertise …


Is it possible take screenshots of that links in the browser and then we can help you better.

Hi @lakshman, Wonderful idea.

Please find the below screenshot


It looks like structured data only. You can use data scraping activity to scrape data and if it contains multiple pages then indicate next page navigator like > or page number etc… It will give output as dataTable and then use For Each Row activity to iterate that DataTable.

ForEach row in dataTableName
Use Click Text activity and pass
row(“PDF”). Tostring

@lakshman, Data Scrapping does the extraction of Text only …How could we download and save the PDF in the desired location?

Below screenshot for your reference… Could you please look into this…

Hi @lakshman, I would be happy to see in detail instruction as I am unable to correlate the sequences here, Kindly look into this… Thanks

1 Like

Hi @lakshman, Or Team members, could you please look into this and advise here. Thanks

Dear @get4expert ,

Kindly use find children activity and then for each child
for each loop perform click activity and once it saves into the local downloads folder
pick only the .pdf extension files using this
tory.GetFiles(“folder path”,“*.pdf”)

hope this helps


Hi @srishsai, No, I am unable to execute this program, I am getting this error message

Dear Team,

Any help here is appreciated. Thanks

Hi get4expert,

Maybe its an idea to extract your pdf file info from the website with Powershell code and copy to a directory of choice.

Powershell and UIPath:

Use the Powershell Invoke-WebRequest method for extracting link information
Invoke-WebRequest -Uri $url -OutFile $target

Please PM me if you need further assistance.

Best Regards,

hi @get4expert,

  1. You can get the count of number of links(n) present, through data scraping.
  2. Iterating in while loop for n number of links, you can use Click Activity and make the selector a dynamic one… most likely through counter variable… which will click on all the links one by one.
  3. You can save the file by passing the path and do further operations.

Please let me know if you have any further queries for the same.