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,

@get4expert

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 ā€¦

@get4expert

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

@get4expert

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ā€¦
image

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

Regards
Srish

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

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,
Metin

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.

Thanks