How to rerun failed script automatically after fail script


I want to explore logic about rerun script, If I run one script regarding search in google and it’s fail due to an error like :- element not found, loading site,etc.

So at that time the script is run automatically second-time(rerun-script) and it working flow.

Is there any solution regarding same???


Use try catch activity… Put inside the try part, your activities the add an exception, search for yours (I recommend system. Exception) that will achieve what you’re looking for


thanks for replying @beesheep,

I know about try catch scenario, if in try block activity has not found element due to page loading more time then it throws in exception block, in exception block I want to restart that script means rerun-script, so once again robot has find that element and success script.

Is there any other solution for same??

I wouldd suggest to have your script in a different. Xaml file so you can invoke in case you need to.
You can use invoke activity in the exception and " |re run it"