cancel
Showing results for 
Search instead for 
Did you mean: 

Blue Prism: Waiting for the downloaded file for web automation for after clicking "Run/Diownload" button

RPAJob_Opportun
Level 3

I am doing a web automation, and the business process requires to start another activity after the downloaded file is completed from the web after clicking the run.

In UIPATH, there is an activity called "Wait for Download". I was looking for a similar activity on the Blue Prism. Could you please help me with this. Appreciate your help.



------------------------------
RPA Job Opportunity
------------------------------
6 REPLIES 6

ritansh.jatwani
Level 9

Hi  @RPA Job Opportunity,

For achieving such a functionality in blue prism, please use action "File Exists" of "Utility-File Management". You can create a loop to check after every 5seconds (or whatever time you want to put depending on size of the file to download) and once you get the output as "True" i.e. the file now exists, you can perform your next set of actions.



------------------------------
Ritansh Jatwani
Consultant
EY
Gurgaon
------------------------------

Hi Ritansh,

Thanks for answering.

Since the name of the downloaded file is not known and the File exists functionality looks for an exact file name. Do you have any other recommendation in this case ?



------------------------------
RPA Job Opportunity
------------------------------

There may be a way to get the file name before you download it. If you're using internet explorer, you can use active accessibility to read the yellow download prompt at the bottom of the window. Otherwise you might try checking whichever download link you're using to see if you can extract the file name that way.

If neither of those work, then you can still determine the downloaded file by checking the folder in which it is being downloaded before the download takes place and again after the download has commenced. The new file should be yours. Keep in mind that browsers usually download to a temporary file before renaming it to the file name it should be. For example, if I were downloading an Excel file, I might see "report.partial" appear until the download is completed, after which "report.xlsx" would be present.



------------------------------
Nicholas Zejdlik
RPA Developer
------------------------------

TomMaloney1
Level 3
Can you use the Save As functionality of the browser? That way you can set the file name yourself.

------------------------------
Tom Maloney
Architect
nBotix, Inc.
America/Chicago
------------------------------

Hi, You can also check not if File exists, but get all files available in the folder, where it should be downloaded. 
Before downloading get all files from the folder and count how many you have found, trigger downloading of your file.
Get all files again, and check if count = count +1.  If it is still same, wait 5 s and repeat. If count = count+1, than your file appeared in the folder.
Sort files in the collection by creation datetime or similar and take pick up the latest file from the collection. 


------------------------------
Kind regards,

Dmitrij Mamajev
RPA Developer
Volvo Cars
Gothenburg - Sweden
------------------------------
Kind regards, [FirstName] [LastName] [Designation] [JobTitle] [CompanyName] [City] [State] [Phone]

RachmaSalim
Level 3
Hi @RPA Job Opportunity,

I have worked on something similar to your scenario.
I believe the easiest way to do so if to enter the destination folder in which you wish to save the file.
If you download the file with the action "Download File" in the utility "File Management", you should be able to enter the path of the folder and get the file path afterwards.

Here are a few tips:
  1. If you download one file a day, you might find it useful to save each file it a daily folder which is then easier to retrieve and work with it without having to loop through more than one file. The daily folder may have a similar format as this: " Local Disk/User/NameFolderDownloadedFiles/Year/Month/Day/DownloadedFile
  2. If the file that needs to be downloaded takes more than a few seconds to download, let the robot sleep a bit for the estimated time it might need before checking if the file exists in the "Day" Folder
  3. If you use a custom action to download your file from the web application, do add an input named "Destination Folder" which you can give it a value in the process level.

If you need help with any of the above, please feel free to ask.

Kind regards,

Rachma

------------------------------
Rachma Salim
------------------------------