Find element question

I have a find element in an outer for loop and inner try catch. I am getting an error with find element that ‘activity timeout exceeded’. I hoped catch section would catch this and for loop continues. Am I doing anything incorrect?

Thank you,


The error message is generated because the activity is not able to find the element. You should try refining the selector in order to be able to find the element.
In case you need more time for the element to appear, you could try increasing the default timeout in the Properties section of the activity.

Thank you @Marco_Ber
Is the catch section where the error need to go? Why is it showing up there?

Thanks again!

Can you attach a screenshot of the flow? So I can fully understand it

Hi @A_Learner ,
I’m sorry if my interpretation of your case correct?


If this is the case,:

  1. Whenever ‘Find Element 1’ faulted, UiPath will throw an error.
  2. Whenever ‘Find Element 2’ faulted, UiPath will throw an error, the error caught by ‘Try Catch’, then ‘Catches’ Section will be executed, then ‘Finally’ Section will be executed, and then it will go to the next iteration of For Each Loop

Hi @A_Learner, according to @ajulioo Try putting both find elements in try then catch will work

here as the find element 2 is in try it will catch the error and continue, where as find element 1 will throw the exception as it was not handled

Thank you @Navya_Haritha_Vendra, @ajulioo and @Marco_Ber

I changed it to check app state. Much simpler. Working. No need for try catch. Thank you for looking into this.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.