onDownload doesn't wait for file download to finish

I have a macro where I need to download multiple files from a site. The code snippet looks something like this:

{
  "Command": "onDownload",
  "Target": "some-file.zip",
  "Value": "true"
},

The macro needs to iterate between multiple options on a dropdown menu to grab different files, and I need to wait until download’s finished before moving to option (the menu is disabled during download). I thought setting “Value” to true would do this, but it doesn’t wait.

The “Target” setting works, letting me rename the file download as expected.

I’m working on Mac/Chrome - not sure if it matters.

1 Like

Can you please post a test macro, maybe with the 7zip.org website, or any other public website?

I solved this by creating a loop that paused then checks against an on-page indicator on the completion of the download, so I’m ok now. I’ll come back and post examples if I run into this elsewhere.

onDownload if value “true”, still does not halt… moves onto next line command… :sob:

@EnthuRPA Did you test with the Demo-Download macro? The macro waits for the download to be completed - as expected.

If it does not work for you, a screencast would be helpful.

1 Like

Sorry @Plankton my previous under-researched comment was incorrect!

Upon little scrutiny using !runtime was able to identify the root cause. The issue was not to do with Kantu or any of its attributes.

The webpage that I am dealing takes ~68 secs to start the download (yeah :roll_eyes:), that’s why well before the download could start, an error until: download start expired! occurred. Storing the !timeout_wait to a pre-assumptive constant (in this case 120s) and then resetting it back once download completed, did the trick. :wink:


image

And hey many thanks for replying!

1 Like