Dynamic Wait in UiPath

hi Team,

Presently working on IE with Uipath, where we need to login into a application and before logging in a legal agreement must be accepted at that point of time system has to wait till the Legal agreement page is loaded and click on the button, tried working with Delay with fixed time, works fine. But when the loading time is going more than the time mentioned its is throwing the error as Button not found.

So for this i need a dynamic wait so tried working with Find Image and Retry Scope but the results are not that perfect is not stable also.

Can anyone suggest me a better way to use the dynamic wait.
Any suggestion will be helpful
Thanks in advance

Hi @harsha8687,
You can use Element exists activity and use whileto loop through it, if the element exists false give some fixed delay and check until the element exist is true. If the element exists is true then break the loop and continue with the flow. Hope this helps.

Thanks .

4 Likes

hi @Uthraa ,

Thanks for your fast response, can i have a code sample…

Hello,

You can increase your TimeoutMS value of your click activity, its default value is 3000.
It will look for UI element within this time it it does find it then will go ahead. otherwise will stop with exception.

Cheers,
Pankaj

1 Like

hi,

What your telling is correct but in that way we cant handle that exception so in that situation. I want by bot to wait for a while and try to click the button again.

Thanks

Hello,

Below link may be useful to you,

Cheers,
Pankaj

1 Like

Hi @harsha8687

It mostly depends on the way you can verify that the page is fully loaded.
Can you clearly state what is the condition here.

From what you have said, I think you need to use a simple Find Element activity with a selector that points to your button. UiPath will pause and wait for the button to appear :slight_smile:

2 Likes

Hi,
You can even use Retry Scope activity and refer the code for this test (2).xaml (7.8 KB)
Thanks.

1 Like

Hi @harsha8687 it would be best to use do while loop as i had to face the similar situation in my project. I used do while as an alternative to delay. Main.xaml (5.0 KB)

2 Likes

Yes even I would like to see an example that uses the Element exists activity with a while loop. Please post an example urgently.

hey @danesh,

There two type of dynamic wait

  1. Image exist/element exist and using and decision to check weather it is found and doing the necessary action, I have attached my sample for your reference Dynamic_wait.xaml (13.6 KB)

  2. The other way is to use the time out in the Image exits/element exist give the maximum time in TimeoutMS if the element is found within the time limit does the required action and if it is not found wait for the given time and performs the action, even after the maximum time the element could not be found exception will be thrown

TimeoutMS

1 Like