The "cannot find UI element" error needs to give more detail

It doesn’t give any info about what it was trying to find nor which Activity faulted.

Could not find the user-interface (UI) element for this action. Possible solutions: • Ensure application is opened and the UI element is visible on the screen at execution time • Edit the Target of the UI activity and use Validation to debug the issue. • If needed, re-indicate the element as its properties might have changed • Use “Check state” activity to check the application state before executing the action • Increase the “Delay before” value to allow time to the application to render entirely and become responsive

1 Like

I agree.

This has caused us a lot of hassel when trying to debug which element the robot did not find. With our failure handling, we know which workflow the robot failed, but that workflow may have many elements referenced and not knowing which element consumes a lot of debugging resources.

Both the popup-error and the log message state the activity name where the target could not be found:
image
image

It might not be visible enough though?

Moreover, if the full selector is used, there is a project settings flag that can provide more information on the selector alternatives, when the selector failed to be found:
image

But when you Catch the error and put exception.Message into an email it doesn’t give you that info - which is what I pasted into my original post. I’m looking at some older automations and the selector itself is included. I think now with modern and the fuzzy stuff, the messages were changed and now don’t include the selector info.

Old version message:

Cannot find the UI element corresponding to this selector: <wnd app='silverlake.exe' cls='HwndWrapper*' /><ctrl automationid='MessageType' />

In recent versions the entire text is different, as it should be for modern, but doesn’t include the selector info. It’s what I pasted into my original post. It’s generic:

Could not find the user-interface (UI) element for this action. Possible solutions: • Ensure application is opened and the UI element is visible on the screen at execution time • Edit the Target of the UI activity and use Validation to debug the issue. • If needed, re-indicate the element as its properties might have changed • Use “Check state” activity to check the application state before executing the action • Increase the “Delay before” value to allow time to the application to render entirely and become responsive

2 Likes

Hi,

I have the same issue as you. Have you managed to find out how we can retrieve the selector that is failing ? That error message is useless :frowning:

It just comes down to a package version issue. The error message you get depends on the version of UiPath.UiAutomation.Activities

1 Like

Hi There,

I am having the same issue, is there any further resolution as its getting hard for on-call person to understand at which activity the robot failed on first glance.

Started upgrading to the modern activities and got the same problem - there is no information on which selector wasn’t found which is a big issue outside of the troubleshooting when we can see exactly where it is. I’m on version 2023.4, please could anyone confirm if there’s anything we can do to resolve?
Many thanks!

Hello,

I agree that these new error messages are generic and it is a hassle to solve these exceptions.

Are there any plans to make Modern activities error messages as it used to be for older activities? Otherwise it would be better to switch back to using Classic activities.