Do While Activity

Hi Folks,

Please help me on this issue.

In website I used click activity, to click on “Request Download”. After click on “Request Download” I should wait for few minutes to change as “Download Report” and then I want to click on “Download Report” button.

This steps how to use in “Do While” activity, I want to check max 6 minutes and this need to check every 30seconds. once this change to “Download Report” then click on “Download Report”.

@Vijay_R1

Sequence (Main Workflow)
|
|-- Click “Request Download”
|
|-- Do While (Condition: Element Exists(“Download Report”))
| |
| |-- Element Exists (“Download Report”) → Output: exists
| |
| |-- Delay (Duration: 30 seconds)
|
|-- Click “Download Report”

Use Element Exist activity for Download Report (and add timeout according to requirements), once it is found, inside the if loop, click on it. Hope this helps. Probably you may not required do while loop to check it again and again. As soon as it is found, required action will be executed.

Thanks

Click Request Dowload
Start Timer
Do While (Not (Element Exist or Text.equals("Download Report”) and timer.Elapsed.Minutes<6)
Get Text Or Check Element Exist,
Delay 30 Seconds

‘Element exists’ has a 30sec timeout on its own by default. Simply extending this delay to 360secs a.ka. 6 minutes automatically solves your problem without the need of sloppy do while loops.

And since you don’t add any static delays of 30 secs as was proposed a lot in earlier posts you get a direct reaction once the button becomes visible instead of maybe waiting up to 30 extra seconds for nothing.

Note: do check the exclusiveness of the selector of the download button. It might be already there but hidden. You might get a false positive if done poorly.