How to test for success/failure of "Wait for Download" activity

Is there an easy way to test if a “Wait for Download” activity was successful without having to search the file system? The “Wait for Download” activity only returns a value in the output variable only when it is successful – however when it fails, then the output variable is never created. How do I verify it is successful?


Hope the below example will help you understand how to validate wait for download activity

First I use a wait for download activity and inside that DO block I kept a single click activity that downloads a file to Downloads folder

I got a output variable from wait for ready property named strfile which is of type FileInfo

Now once after running the bot to validate whether wait for download activity actually waited or not, with this writeline activity

(strfile is Nothing).ToString

It gave me FALSE as value
Which means strfile variable has some value and it has downloaded some file

To know the file details May be mention like this

And similarly. I removed that click activity inside the DO block and then ran again
This time it won’t click and download any file
So now to validate
I used the same

(strfile is Nothing).ToString

and it gave me TRUE
Which means it has not downloaded any file and is nothing

So with the output variable and the above expression will give a Boolean variable with which we can validate the activity

Cheers @online

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