We will use UiPath to automate application processes and we want to manage the case when an unexpected window appears (information, login error… etc).
We don’t know anything about this window as it is unexpected so we can’t use a selector to find it.
How can we detect this unexpected window and launch a specific process in this case ?
For this case I suggest you to Map the process carefully, I think the only need here is a deep comprehension of the system you are using, for instance if there is a message that pops up it means that there is a trigger, find the trigger.
if there is no way to find the trigger(s) what is more important is the type of messages you will encounter, this way you will be able to resolve the exception with try catch statements for instance, no matter at what point you find the window.
I realized that is good to draw the solution as if it will fail and repeat it a couple of times, I think this a great opportunity for your and your team to learn a good lesson.
We would want to use UiPath on some really critical process and thus we would want to prevent all possible cases, even unexepected ones.
It is quite simple to manage pop ups that we know the application could display, but we also want to manage the others.
There is no other solution in UiPath than waiting for an exception and catch it ?
The TryCatch activity might be what you need. It can catch any type of error and take certain measures that you choose. Or it can take different actions based on the type of error it encountered, so you can take even more specific steps in solving the error.
But a good method of improving unexpected behaviour is to use a semi-automated learning:
set up the try-catch with various catches for the exceptions that you know of.
for all the others, set up a sequence that takes a screenshot and saves it somewhere for later reference; or sends it by email or whatever. So you can then improve how your automation reacts to those errors.