Wait till download is complete in chrome browser

I am using chrome browser for my clients. we want to download some large csv files. How can i wait till the csv file down is complete or not. only after file download is complete, can proceed to next steps

Once the file is downloaded, you will get the notification (pop-up) window that file is downloaded. Please wait until Element Exists for that window to appear.

If you have done the advanced certification, then you might have know this. Because there is a similar requirement is there.

1 Like

Thanks for suggestion. However for chrome browser, there is no pop up after download. files are downloads silently on the bottom left corner of the browser. this cant be identified using a selectors since it is outside of the browser.

can you please suggest how to overcome this situation [ on chrome browser]

1 Like

Hello,
Just an assumption, please do little research on this.

I guess when a new download starts an instence of Chrome will be created in system processes, you can count the number of Chrome sub process/instence and wait till the number gets reduced by one.

hi,
just my 2 cents on this.
Another approach is check if the file exists using “path exist” inside a “retry scope”.

4 Likes

Hi,
You can count the number of files in the download folder before downloading the file.

After downloading, check the count of the download folder where it is increased by 1. Once the count is increased you can process the next step.

fmsimoes is spot on. I’ve used this same approach in the past and it works flawlessly. The robot will continue to check for the path to exist and will continue to do so until it appears.

Quick Note:
Chrome download settings has an option to prompt you when downloading a file. Once the file is ready to download, a file explorer window will open which provides the file name. You can grab this text to get the file name if needed.

3 Likes

Hello @FebinKAndrews

You could enable the download notification on Chrome Settings > Advanced >Download> ask where to save each file before downloading
Then you could do just as @KarthikByggari said, using an element exists and a while to check if the notification is already been shown creating a loop.

Regards :smile:

1 Like

Thanks for the reply. I think this is a viable option. i am asking for the path every time and from there i can get the file name and combining folderpath+filename i can check the fileexist in a retry mode - Thanks alot for all the help

1 Like

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