Handling run-time error from the Application being automated using UiPath

error

#1

How to handle the run-time error messages generated in the Application itself which is automated using UiPath?
Errors generated by UiPath (exceptions like ‘element not found’ and others) can be handled by ‘Try Catch Now’ activity, but unable to handle the errors by the application.
Please help.


#2

Hey @Nilabja.Saha

When dealing with Application error messages and alerts what we can do is to make custom error message by detecting them and can throw custom exception and then you will be able to catch it in try-catch.

Flow:

  1. Detect Alert/pop up by using “Element Exists” .
  2. If it will return true then you can use Either Directly “Throw” activity with custom error message or can use "Microsoft->Activities->Expressions->Custom Exception activity as well.
  3. in catch block handle it.

For your reference:

Let me know in case of any problem :slight_smile:

Regards…!!
Aksh