Help in Wait for download

Hello Automation Engineers,

My use case is I want download a excel file from a webpage. I am currently using wait for download acitivity for downloading. In the do section of Wait for download activity, I have placed the selector which is responsible for download the excel file.

Here comes a question, The download takes nearly some 2 mins. Meantime I want to log message telling that the file is downloading.

Within that 2 mins I want to log the current status of downloading.

Any way to do that?

Hi @Ashok98 ,

Normally we would provide the Loggings Before and After the Download, Such as Before the Wait For Download we could Provide the Log as Downloading of the File has Started and Later after the Confirmation of the Downloaded File exists, we put the Log as Downloading of the File is Completed.

What kind of Logging do you want to add if the above Method is not what you are looking for?

Thanks for the help.

I need logging like while wait for download activity is running, I want the system to log every 3 sec mentioning the file is downloading…

Hi @Ashok98 ,

I don’t think there is nay direct activity which will tell you it is downloading or not. But you may achieve it by doing the parallel activity. In loop keep on checking the size of the file if it is increasing then you can print message like downloading.

Write your own wait for download code then it can work however you want.

I did mine as a custom activity (library).

It also moves and renames the file for me if I want it to.

image

Is your goal a proof of concept? Oherwise why would you want to log every 3 seconds to see if a file is still downloading?
If it indeed takes up to 2 minutes to download you create 40 lines telling you the same over and over, making your logs cumbersome and imparactical. If it is to measure time to download, a start and end will suffice, and if it has monitoring purposes, if you are continiously monitor your individual bot to see if it does what it is supposed to do, you might as well skip the bot at all and download the file manually (or attended) for the same end result.

I’m not trying to disrespect your design choices, but to encourage you to look at the big picture of your automation goals and focus on the desired enr result, and not stare blindly at micro solutions you might not need in the end.

i would prefer the while with path exist activity and give hard coded delay as 30 seconds

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