Help with For each / Try catch

Hello all

I’m trying to using the Try Catch activity within For each row activity (Wait for download activity)

So basically, i have a scenario that i have a list of item and i have to query each item and download an excel file for each, so i’m running For each activity for each item, but if the item has no data, then there will be no excel file which make the wait for download fail and it will stop the automation, so i put a try catch activity at wait for download activity

And then i got this error “The folder does not exist”. I believe it mean that the Downloaded folder where store the downloaded excel file wasn’t found by the automation even though i did declare it so i don’t really know what is wrong now

Appreciate any help

Thanks

Hi @thang.doan

You need to pass the full path of the file to store it successfully, If you passing then keep a debugger and check what value it is passing and see whether all the path is correctly passing

Hope this may help you

Thanks,
Srini

Hi @thang.doan

Is this type of Error that you got?

You can do as below. Put Wait for download activity inside the Try section of Try catch activity. Then select “SystemException” or “TimeoutException” in the catch section.

Hope this helps :slight_smile:

1 Like