OCR - SelectorNotFoundException

Hello there,

Even though I change the selector’s value to a wild card (asterisk), I keep running into this error. What else could be the problem? Can someone please help?

19.7.0+Branch.master.Sha.8c253d13718eed5c7db27daef6facd1fe1b0d067

Source: Attach Window Pdf

Message: Cannot find the UI element corresponding to this selector: <wnd app='acrord32.exe' cls='AcrobatSDIWindow' title='*.pdf - Adobe Acrobat Reader DC' /><wnd aaname='Document Pane' cls='AVL_AVView' title='AVScrolledPageView' /><wnd cls='AVL_AVView' title='AVPageView' />

Exception Type: UiPath.Core.SelectorNotFoundException

RemoteException wrapping UiPath.Core.SelectorNotFoundException: Cannot find the UI element corresponding to this selector: <wnd app='acrord32.exe' cls='AcrobatSDIWindow' title='*.pdf - Adobe Acrobat Reader DC' /><wnd aaname='Document Pane' cls='AVL_AVView' title='AVScrolledPageView' /><wnd cls='AVL_AVView' title='AVPageView' />  ---> RemoteException wrapping System.Runtime.InteropServices.COMException: Cannot find the UI element corresponding to this selector: <wnd app='acrord32.exe' cls='AcrobatSDIWindow' title='*.pdf - Adobe Acrobat Reader DC' /><wnd aaname='Document Pane' cls='AVL_AVView' title='AVScrolledPageView' /><wnd cls='AVL_AVView' title='AVPageView' /> 
   at UiPath.UiNodeClass.FindFirst(UiFindScope scope, String nodeID)
   at UiPath.Core.UiElement.FindFirst(FindScope scope, Selector selector, IVariableResolver resolver)
	--- End of inner exception 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)

Thanks
Hara

Hi
your selector looks good, but is that pdf application is in foreground of screen
it seems like the bot is not able to find the element as it is not in the foreground of the screen

Cheers @Hara_Gopal

HI @Hara_Gopal

The error is popping up from the attach PDF activity. For the attach PDF activity to work, the PDF file should be open in the background for it to attach it to itself… So just make sure you have a open PDF activity before the attach pdf to open the required pdf file…

Let know whether it helps…