<img src="//trc.taboola.com/1222697/log/3/unip?en=page_view" width="0" height="0" style="display:none">


The Knowledgebase articles are deprecated. Please visit the new Guides and Resources here: https://www.uipath.com/developers/guides-and-resources.

Knowledge Base

ContinueOnError with Attach Window Activity

The Attach Window container enables you to perform multiple actions in a single UI element. This is useful when creating workflows that deal with automating multiple applications.

This activity can also be automatically generated when using Desktop recording. For more information, see About Recording Types and Example of Automatic Recording with Basic and Desktop.

ContinueOnError is a common property that you probably have encountered multiple times with many activities. It only supports boolean values (True, False), and enables you to specify if the following activities should continue executing or not when the current activity has failed.

Note: In the case of the Attach Window container, and other activities like it, the ContinueOnError property applies to the entire block.

Therefore, if you set ContinueOnError to True and the Attach Window or any of the child activities throw an error, they are ignored and the workflow continues.

If you set ContinueOnError to False and the Attach Window or any of the child activities throw an error, the workflow stops and an error is displayed.

If you want, for example, to skip the execution of the Attach Window block if the specified UI element is not found, we suggest first using an Element Exists activity. This tells you if an indicated UI element is displayed on the screen or not.

Based on the value returned by the Element Exists activity, you can then take the decision of executing or not the Attack Window block, using an If activity.

A simple workflow example to help you get the picture:

Example of how to use Element EXist