Cannot find the UI element corresponding to this selector: <wnd app='notepad.exe' cls='#32768' />

It is not able to recognize the element in Basic recording. Does anyone got the same issue.

18.4.0+Branch.master.Sha.b805b316b1c47ae06c0fe7e619b9c9f96e9e774c

Source: Attach Window ’ Menu’

Message: Cannot find the UI element corresponding to this selector:

Exception Type: UiPath.Core.SelectorNotFoundException

An ExceptionDetail, likely created by IncludeExceptionDetailInFaults=true, whose value is:
UiPath.Core.SelectorNotFoundException: Cannot find the UI element corresponding to this selector: ----> System.Runtime.InteropServices.COMException: Cannot find the UI element corresponding to this selector:
at UiPath.UiNodeClass.FindFirst(UiFindScope scope, String nodeID)
at UiPath.Core.UiElement.FindFirst(FindScope scope, Selector selector)
— End of inner ExceptionDetail stack trace —
at UiPath.Core.Activities.ScopeActivity.EndExecute(NativeActivityContext context, IAsyncResult result)
at UiPath.Core.Activities.AsyncNativeActivity.BookmarkResumptionCallback(NativeActivityContext context, Bookmark bookmark, Object value)
at System.Activities.Runtime.BookmarkCallbackWrapper.Invoke(NativeActivityContext context, Bookmark bookmark, Object value)
at System.Activities.Runtime.BookmarkWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)

Open the selector and use repair option.

If still you are facing problem, use Uiexplorer, indicate the notepad window, and add more attributes.

Thanks , this worked for me !! but i had to identify these again

1 Like

kindly can you help me regrading this error

19.2.0+Branch.master.Sha.21b678a4c3a8b1362fcdd6e92496f991e5a7da37

Source: Attach Window ‘Testtxt N Notepad’

Message: Cannot find the UI element corresponding to this selector:

Exception Type: UiPath.Core.SelectorNotFoundException

An ExceptionDetail, likely created by IncludeExceptionDetailInFaults=true, whose value is:
UiPath.Core.SelectorNotFoundException: Cannot find the UI element corresponding to this selector: ----> System.Runtime.InteropServices.COMException: Cannot find the UI element corresponding to this selector:
at UiPath.UiNodeClass.FindFirst(UiFindScope scope, String nodeID)
at UiPath.Core.UiElement.FindFirst(FindScope scope, Selector selector)
— End of inner ExceptionDetail stack trace —
at UiPath.Core.Activities.ScopeActivity.EndExecute(NativeActivityContext context, IAsyncResult result)
at UiPath.Core.Activities.AsyncNativeActivity.BookmarkResumptionCallback(NativeActivityContext context, Bookmark bookmark, Object value)
at System.Activities.Runtime.BookmarkCallbackWrapper.Invoke(NativeActivityContext context, Bookmark bookmark, Object value)
at System.Activities.Runtime.BookmarkWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)

I am still having issues with this. Repair worked on the higher block… but, continues to fail in the following steps. I am trying to run through Lesson_4-Practice_1 given in the UIPath Academy Level 1 - Foundation Training - 2018.3. The solution has several references to:

wnd app=‘notepad.exe’ cls=‘#32770’ title=‘Font’
wnd ctrlid=‘1136’
wnd ctrlid=‘1000’
ctrl name=‘Font:’ role=‘list’
ctrl name=‘Verdana’ role=‘list item’

(Note: values have changed as I tried to understand what’s happening here)

As long as the window is opened and unsaved… I am able to correct the issue. However, the practice solution is written to start a new notepad section and I am not clear what’s driving the cls and ctrid values… I haven’t figured out how to debug this issue.

Is there a solid explanation of sectors and their properties?

Hi @ralpheward,
I believe you need to know the difference between partial and full selectors. Additionally there are attributes which are different for every run of the application. Those you need to avoid in your selectors cause it will provide the error on every next run of the workflow/activity.

Hope this might help you:
https://docs.uipath.com/studio/standalone/latest/user-guide/about-selectors

4 Likes

Thank you Pablito… I have made it through this section and trying to figure out Lesson 5 - Practice 1 now… it just isn’t working and I am about to pass to the next subject.

1 Like

Understanding how selectors work is crucial, so I would recommend going back. The most common issues I saw are different ids as mentioned by @Pablito, and not using wildcards in relevant parts of your selector. Just an example:

wnd app=‘notepad.exe’ cls=’#32770’ title=‘Font’

This selects an application named notepad.exe with “Font” in the title. Go ahead, save the file under a new name - your selector will no longer be valid (as it keeps looking for Font, but now your file is named “Foo”). This can be fixed quite easily by adding a wildcard to the title, or by omitting this attribute altogether.

wnd app=‘notepad.exe’ cls=’#32770’ title=‘*’

4 Likes

Thank you… I see the pattern to follow now.

To avoid this error while selecting the notepad do not select the saved one. Open a new notepad and leave it, then open Uipath and now select unsaved notepad so it avoids the error by having the title as default value ‘untitled’

Difference in the selector field seems to be:

Saved notepad:
"<wnd app='notepad.exe' cls='Notepad' title='saved_notepad - Notepad' />"

Newly opened notepad (without saving):
"<wnd app='notepad.exe' cls='Notepad' title='Untitled - Notepad' />"

Else change the title field in the code by replacing with * wildcard operator (If you press validate it errors out but it works as* is an wildcard operator)
"<wnd app='notepad.exe' cls='Notepad' title='*' />"

2 Likes

Thank you! This has worked for me

Thanks @Vivek_Arunagiri it helped me to solve my issue.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.