Handle Incorrect credentials and retry logic


Can anyone plz suggest how to handle the scenarios when there is incorrect credentials or incorrect URL while trying to login to gmail account. And the retry logic for 2 times if credentials is incorrect.

Hi @vidhan.rpa

Have you looked at the REFramework? This can be a good starting place for inspirations regarding best practices on error handling and the use of credentials.

As for logic, ensure that the login attempts are contained in a try-catch block, where you catch the appropriate exception type and also increment a counter.

In your process logic you can then set a decision to evaluate that counter and safely terminate the process (and maybe alert the developers) if it exceeds a set value.

Hope this helps,


Hi @vidhan.rpa,

Yes, adding to @RyanHarris

There is also something called Retry scope activity. This allows us to retry the logic for the number of times configured till we reach the expected screen.
You can kill the application and retry till you get the necessary screen. Hope it helps.

Happy coding! :slight_smile:

Hi @vidhan.rpa

Have a look to the below thread :-

Hope this workflow may help you to solve your query
Mark as solution if this helps you and like it :innocent:

Happy Automation :raised_hands:

Best Regards
Er Pratik Wavhal :robot::man_technologist:t4: :computer:

Thanks! Pratik