Hi all, I need to download few files from an application so i need check how many files are there and give the delay time accordingly. I have a variable by name output where I will get to know how many files are there in that folder. By checking the output I need to give the delay time accordingly. I need to do this in Switch activity. How do I go with it.
Hi @hanviprebday ,
Can you share image where you download?
I have to copy the files so until 50files get copies I need to give a delay.
In that folder some times I may have only 2 files or 100 files so I need to give delay accordingly
You can get text from this dialog
to get number of files
or use wait download success activity
Wait for download will not work here as I am copying the files there is no download option
My doubt is if there are 10 files to download i should give a delay of 3mins, if there are 20 files i should give a delay of 5mins like that till 100 files i should check and give delay. I cannot use if activity, i should use only switch so how do I do that
Please help me it’s a bit urgent
How about just waiting for this dialog to disappear? You could do that with Check App State activity, if you’re using Modern.
I tried that way but it’s not working
why do you don’t use dynamic value delay base number of file?
when you copy , have dialog, that’s right?
we can get text from dialog to know how many files call it’s Num
we can use time delay per 1 file is X(s) eg:10s
total time delay is Num*X (s)
How was it not working? Did you get some errors? If you can give some info, we can try to make it work.
@efelantti the copy dialogue box is not getting captured when I am using use application/browser activity
You can’t indicate it? Are you using Window attach mode = Application instance, in Use application/browser?
I am getting the number of files in that folder I am storing it in a variable called output now I need to check if output<=10 then put a delay of 30sec, else check output<=20 then put a delay like this I need to check for 100 files. So what expression i should give in switch activity
I would still try to get the dynamic wait solution, because static wait times can cause you issues (maybe all files do not download as fast etc.). But for your question, you should use Else If instead of Switch. You can add as many Else If - clauses as you require, just set the conditions as you described.
@efelantti thank you gotit
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.