Make use of google chrome's download bar to ensure file download is complete

I need to ensure that the download completes before an action is taken on the file. I tried implementing On Element Appear activity to achieve this objective (Please check the attached image). Now the problem is that the UiPath robot is not able to detect the download bar at the bottom of chrome browser. I made sure that under google chrome settings, it asks each time before download and that the bar shows up every time a file is downloaded. But in case of UiPath execution, upon download, the bar appears momentarily and disappears.

Link to workflow imageUiPath_AssignmentII.PNG - Google Drive

Selector used (wildcard character has been used)

<wnd app='chrome.exe' cls='Chrome_WidgetWin_1' title='ACME System 1 - Download Monthly Report - Google Chrome' />
<ctrl name='ACME System 1 - Download Monthly Report - Google Chrome' role='pane' />
<ctrl name='Google Chrome' role='pane' />
<ctrl name='Downloads bar' role='grouping' />
<ctrl name=' *.csv' role='grouping' />

And Wait visible property has been set to True.

Hi @Vats55,

You can make use of Wait for Download Property.
https://docs.uipath.com/activities/docs/get-last-downloaded-file

Thanks,
Saranya K R

A better way is to use a Do While loop to check if the file exists. Your condition for the Do While would be that the file doesn’t exist.

This activity has a major flaw. You can’t specify any filters. It just watches the folder for any new file - and when the browser downloads a file it often first creates a temporary download file that the Wait for Download activity will erroneously think means the download is complete. It’s much better to write your own Do While that waits for the exact file you want.

1 Like