If window can't be found ignore sequence of tasks for window and move on to the next window

I currently have a sequence that opens a window and performs numerous tasks within that window before closing it out and looking for the next window to open. Occasionally, the window cannot be found and it throws an exception. How do I make it so if the window is not found it looks for the next window, and ignores all the tasks it was supposed to do if it had been able to open the first window?

Good day @gianna.demetroulakos,

Usually, if the window is not able to be found, its because the respective application has been closed. The best solution would be to open the respective application first using Open Application activity (Considering the window is regarding the Desktop Applications). The alternate method would be to add an Element Exist activity and the whole tasks for the first window inside the IF activity. So that if the first window cannot be found, it will ignore and move to the next window you have given accordingly.

For further troubleshooting, I kindly request you to add more details. :slightly_smiling_face:

My sequence is designed for microsoft planner (webiste version). It reads a list of task names from an excel file. Starting with the first line in the excel file it looks for that task name, opens the task and manipulates it, then closes it and moves on to the next task name on the list. I would like for it to move on to the next name on the excel list if it can’t find the one it is currently looking for and would need it to ignore the manipulations it was supposed to make in the first task

use the property ContinueOnExcpetion=True

I hope you are using the For Each Row activity to read the rows in the excel file you have mentioned to retrieve the task names. You can use the Element Exist and IF activity to decide if the modifications to the respective task in Microsoft planner has to be executed or skipped. You might need to do little bit of modifications in the selector (like adding a variable) of the Element Exist activity since you are checking for an object you already know what it should be.

You might want to consider going through the UiPath Academy course, related to adding variable in selectors :slightly_smiling_face:

what would be put in the condition section of the if activity?