I am using ui path to download a file from a website and for my next activity I need to wait till it downloads ,so is there any way to know if it is completely downloaded.
May not be right solution but working fine though
Thought of many workaround but not 100% efficient.
How about keeping an eye on progress bar
- Go to download (ctl+j)
- check whether download started or not (image exist on progress bar)
- once started then look for progress bar to vanish (Wait Image Vanish)
Excel Application Scope help
thanks for the reply @ddpadil , but in my case the download size is very big and it’s taking a lot of time to download so if i use this flow I will have to make sure that download window is open and wait till the download gets completed.
but i am looking for a solution that will monitor in background and notify me if it gets completed.
so that meanwhile I can do other activities.
Is it possible??
thought of another approach:
- Get the new file which is downloaded
- Try to open it eventually its gives error if its still in progress else the file will be processed this is how you can validate the confirmation of file download.
- But here is a catch what if you next activity(entire post workflow) get over before i check the file status of the downloading file(as you mentioned it take a lot of time to download).
Are you using monitor event (user assistance agents) i guess it doesn’t make any sense as you wants to know status background.
actually I think for this also I need to open the file location all the time so that i can loop over that file opening activity as let say in every 5 min it will try to open the file and continue the loop if error comes …
but as i said download can take a lot of time and i want to do other activities simultaniously .
I dont want to just look at one window until download gets completed.
and I am not using any monitor event activity instead i was using while loop to check the image exist as ur first reply.
will that monitor event activity help in my case?
Is your file having the same name as filename while download is in progress? If not, you could keep checking for file exists (if you know the file name) in that folder, once found go to your next activity.
I was thinking the same because when your file is being downloaded, at least in Firefox, the file name is something like filename.part. It basically changes the extension and once it completes the download, it changes to the original file extension.
If not by filename you can go by file size. When the file isn’t downloaded yet, it usually is 0kb.
I don’t think so.
When file is being downloaded then its file size keep on changing.
Checking file extension would be reliable solution .
Access IE save notification in the background
ya , actually I am able to do it by checking the .part extention
thanks to all for your valuable reply:grinning:
Hi kamal , you have to use do while loop for check element exists . If you are using IE browser
Its will be popup once download is completed . You have to check continuously till the element exists. Once the element exists the loop will be stopped. Thanks
Do you know the name of the file you are downloading?
If you do, go with File.exists. Wrap it in a loop and wait for the file to be downloaded. It works like a charm.
Be careful not set up an infinite loop that might stop your automation. You need to consider if something can go wrong during download.
This is much better than using image/element exists/vanish.