Back

Explore Courses Blog Tutorials Interview Questions
0 votes
1 view
in RPA by (12.8k points)

When exceptions occur in a UIPath project I have an email that is sent out with the exception info included. There seems to be an issue though where I can only see where the error occurred by looking at the selector information such as:

Cannot find the UI element corresponding to this selector: 

<html app='chrome.exe' title='Microsoft Dynamics GP' />

<webctrl aaname='Add' idx='1'

    parentid='a00000000000000008549000000030009000000000001000000000000' tag='DIV' />

This info and the stack trace or any other info is not helpful for quickly finding the source of the problem. I have looked through the UIPath documentation and forum and found only this question, which seemed to point to using the exception. Source to show the name of the activity where the error occurred. exception. Source only returns “UiPath.Core.Activities” though instead of "Type into Copy Job# 'INPUT'" in the following example:

exception issue

This causes a big problem with exception handling. How can I easily return the source with each exception?

1 Answer

0 votes
by (29.8k points)

When your selector fails, you end up with a new object of type UiPath.Core.SelectorNotFoundException. However, UiPath's developer team decides to add the Display Name into the inner exception, there is little you can do in this particular case.

Here is a workaround you can use :

  • Add some details to your exception. You could have certain blocks of try-catches (example: logging into the system consists of three individual activities, and they reside in one block).
  • Rethrow the exception. That way the Display Name will end up in the execution log file.

Related questions

0 votes
1 answer
0 votes
1 answer
asked Jul 17, 2019 in RPA by noah kapoor (5.3k points)
0 votes
1 answer
asked Jul 10, 2019 in RPA by noah kapoor (5.3k points)
0 votes
1 answer
Welcome to Intellipaat Community. Get your technical queries answered by top developers!

28.4k questions

29.7k answers

500 comments

94.1k users

Browse Categories

...