TryCatches with Matches

Hello together,

I have problems with my Matches when the robot couldn’t find the wanted text in my mail.

In the “Try” I have the whole process with my matches when the text was found.
image

In “Catches” I have entered a message box that the text I looking for was not found.
image

But I got the error-message:
image

Have anyone an idea what is wrong?

Best regards
Thomas

Hi,

Matches activity doesn’t throw exception even if there is no match.
We can check whether there is match string as the following.

Regards,

1 Like

give a try on making it more defensive by checking the returned match e.g. within an if activity and condition:

  • isNothing(YourMatchVar)
  • alternate option: YourMatchVar.Count / YourMatchVar.ToArray().Length

That’s perfekt :-), thank you very much

1 Like