Download Pdf and name accordingly

My Automation needs some assistance. Below is the Public URL that i will be working with. Pease see below steps to get started.

URL - Welcome to MID :: provided by vPIC - MID
Sample Manufacturer ID - 955, 966 ,959- These are 3 different numbers to test

  1. Type Manufacturer ID in the Manufacturer ID text box
    2.Uncheck the Part 566 text box
    3.Click Search at bottom of Page
  2. Select 100 from the drop down list in the Show Entries box

In the Org name column the I need to click on each hyperlink and then a PDF page will open up, I need to download that pdf and rename it. Each PDF needs to be Renamed According to the information in each row corresponding to the pdf link. Below is the Rename file structure

File name = Orgname_letterDate_ManufacturerName_ModelYearFrom_ModelYearto

I’m having trouble navigating to each PDF in the table and then renaming that pdf once its downloaded. I can extract the URLS using the data scrapping tool and navigate and download the files. my issue is renaming the files according to the naming convention. Some assistance or a sample workflow would be much appreciated.

@NATHAN_MORA

Use for each ui element to click open each plus and then get the details of from and to…

So your rename string would be

Orgname + "_" + letterDate.Replace("/","")+ "_" + ManufacturerName+ "_" + ModelYearFrom + "_" + ModelYearto

Cheers

Im not following what your saying.

@NATHAN_MORA

As the from and to dates can be extracted by clicking plus icon…

Use a for each ui elemnet activity…which will loop through each plus (that is each row) and extract required information

Now inside the loop you have to extract the required text using get text and store it

Now to rename …already you have the info into different variables or in the datatable …so use the expression as above and new file name can be updates

Hope this is clear

Cheers

Is this in the modern design?

@NATHAN_MORA

Yes…if you dont see then go to activities and then select filter and select show modern

Cheers

I got it, Im still not following how to open the pdf and save it with the naming convention.

@NATHAN_MORA

You need not open the pdf…you have arename file activity as well…which will do the job for you

Cheers

Im sort of on the same track just not sure how to put it all together!

@NATHAN_MORA

That is what i pro ided on top…you have to just concatenate each variable that you are getting in the loop

Cheers

Can you provide a sample workflow ?

I got the automation to use the for each ui element and click each hyper link, my issues is getting the text now to rename the file name. Im getting the error "value of type string cannot be converted to UiPath.core.uielement

@NATHAN_MORA

Can you show what you tried?

In some place youa re assigning a string to uielement type or getting uielement but trying to convert to string

Cheers

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.