Retry Scope activity in UiPath RPA

The Retry Scope activity allows you to repeat the execution of enclosed activities as long as a specific condition isn't met or an error is encountered.

The purpose of the Retry Scope activity is to catch and handle errors, similar to the TryCatch activity. However, the key difference is that Retry Scope focuses on retrying the execution of activities rather than providing a more complex error handling mechanism. It simplifies the process by automatically retrying the activities until the condition is met or an error is thrown.

This activity is a powerful tool in cases where exceptions are thrown sporadically and other measures, like tuning selectors, already took place.

For example, a particular selector isn't found in a certain application in less than 5% of the time the workflow runs, but no further selector improvements are possible. Using Retry Scope in this scenario will make the robot try to access the selector again in case a SelectorNotFoundException is thrown.

The Retry Scope will throw an exception if the retry number is exceeded. Therefore, it should be place is a Try Catch, with a proper Log Message in the Catch section.

Source: UiPath Academy