Retry specific task (logic)

Hi team,

I have a scenario where I have a task which will launch and login to a web application. first time if bot failed to login to web application in that case bot has re-try the the same logic again to launch and login to web application.
Much appreciated your help!

Thank you
Mahaling Patil

Here’s how I would approach it:

You could put the next step after your login in an Exception Handling, and if it succeeds, you know you don’t have to try logging in again. If it fails, you can attempt your log-in again in the “If an exception occurred” section and hope it works there (you’ll want to put the first step after logging in into this section as well, so you don’t attempt it twice if the log in works the first time).

This would only work if you only want to try logging in twice. If you want to attempt logging in over and over until it’s a success, you’ll need to set up a boolean variable and do a while loop until something triggers your boolean to true.

@ryule Thanks for your valuable input.

1 Like