Automation questions

In UiPath, I am creating automation that does some pretty simple tasks. I am trying to make something that way. If it fails, it will retry again. So, in my head, I am thinking, “try this” if true (or works), continue; if false (or doesn’t work), refresh the page and try again; if true (resume); if false (end process). I can’t wrap my head around how to set that up in UiPath. Any suggestions on what activities to use? Check App State, Retry Scope?

Hello @Primal

I would suggest using a flow decision to achieve this easily. in that you can set the condition and redirect the line to the same flow if it fails.

Conditions. Branching a Workflow.


1 Like

Hi @Primal ,

in my opinion Element exist(if you use classic activity) and retry scope is more than enough to implement the requirement you posted. if the element does not exist you can retry multiple times if still fails you can end process or if you get proper element from the UI you can resume the rest of the flow. thanks.


1 Like

In the retry scope activity, I have set in a try-catch currently. When it does the initial process, it will go ahead and do the retry scope anyways even if it passes on the initial function. Do you know of a way to make it notice if passed or failed? Also, in the condition section of the retry scope, how would I write in there “if failed end process”?

Do you know of a way to make it notice if passed or failed?

Retry scope condition → use element exist activity as condition for retry scope.

for suppose if we set number of retries to 3 those many times it will try to check the UI if we did not get proper UI element or some thing i snot correct then we will get the element exist output as false. we could use this boolean variable for further flow like we can end process.

if possible could you please share screenshot what logic we are using so that you could get better help from forum. thanks

Ok, that makes more sense. Here is how I currently have it set up.



i am sorry i am not able to get what you are doing by seeing screenshots. mostly there is no need of try catch blocks for the UI automation . if you are checking like after clicking the login button whether you are getting the summary page/landing page then in that case we could use logic like below.

Retry scope activity → add your all the login activities

in condition → keep element exists it returns boolean value

after retry scope use if condition then → write the success flow activities else-> throw activity to raise system exception to main flow.

sharing the sample screenshot for your reference.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.