Stay on page popup while downloading the file

Hello Community!

In this development iam using wait for download activity to download a zip file.
But while downloading the zip file i get stay on page pop up. As shown in image

Some time file takes 7 to 8 min to download and some time it take 2 to 3 min download.
And that popup keep coming after 3 to 4 min.
So i have used on element appear activity and i have added timeout milisecond 300000.
But when the file get downloaded in 2 to 3 min it waits for 5 to 6 min i dont want that.
How can i add the logic that till the file get’s downloaded… in between whatever popup it will get it should click continue to stay.

@Priyesh_Shetty1 Is there an element that appears once the file is complete downloading?

You can detect that element along with this pop-up and if it shows up you can stop checking and move on with the process.

@argin.lerit no element is there once downloading is done

@Priyesh_Shetty1 - How does the site show that the download is complete?

@argin.lerit the site doesnt show anything when download is completed…when the download get started it get viewed in google chrome downloads.

@Priyesh_Shetty1 Does the download stop if the user gets logged out (i.e. if the user does not click on the “Continue” button in the pop-up)?

@argin.lerit download does not get stoped but after wait for download whatever click and all activity i have used there it will get an selector error.

@argin.lerit Does the process need to wait for the download to finish before proceeding with the next steps? If this is the case, maybe you can issue a Refresh Browser activity periodically (e.g. every 60 seconds) to keep the user logged in.

How about adding an “Element exists”/“Check app state” activity after the “Wait for download”? If the popup exists, click it away, if not do nothing. After that you can continue with your other steps.

I would use the path exists or file exists activity within a do while and delay while it is false to see when the file has downloaded then click continue when the exist boolean is true

@efelantti this popup actually arises while file is getting downloaded and the file size is large and it takes time to download…Then after 4 to 5 min that popup comes…so i need to add this steps inside wait for download.

You should have activities that start the download inside the “Wait for download”. Things that happen after the download is finished need to come after the scope. As I understand the popup has no impact immediately, and so it can be closed after the download is finished, is that correct?

@efelantti it can’t be closed when download is finished it should be closed in 4 second otherwise it will logout the page…I mean when bot is waiting for the file gets downloaded that time it appears…so that time it should click on that popup.

@Priyesh_Shetty1 ,

You can go with “parallel activities” that will solve your problem
On one side you can keep your actual workflows and in the another side you can keep the actions that you need to handle the exception

Hope it helps you out!

Indeed, in this case parallel is the way to go - in case you want to use Wait for download. The other option is to check in a While loop for the download to finish and for the popup.

@efelantti how can i implement this logic exactly.


It could be something like this:

@efelantti what is that downloading file variable?is that wait for dwnld activity variable?

It’s a variable of type Boolean. It’s meant to control when to stop looking for the popup on the right side branch (as you can see, it’s in the Condition property of the Do While loop).

@efelantti your method doesnt worked.