Error with context menu

Hello, I have been searching many topics over the last 8 hours trying to get one of my builds to click on a context menu and export a file after right clicking. I am to the point where I got the right click function to work and the context menu appears then the build times out, from this point i have tried a “click” to get it to click on export, and it always times out saying it cannot find the menu option. I have also tried inserting down arrows and an enter and again it times out saying it cannot find the menu. I also tried the element -> control -> select item and it wont let me record that one saying it cant find the menu.

here is one of the errors:

Source: Click ‘menu item Export’

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.TaskAsyncCodeActivity`1.EndExecute(AsyncCodeActivityContext context, IAsyncResult result)
at System.Activities.AsyncCodeActivity.System.Activities.IAsyncCodeActivity.FinishExecution(AsyncCodeActivityContext context, IAsyncResult result)
at System.Activities.AsyncCodeActivity.CompleteAsyncCodeActivityData.CompleteAsyncCodeActivityWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)

There are two options to get this right.

  1. You could try Recorder feature (experiment with Basic and other modes, depending on your target application).
    In my experience, the recorder has a much better chance to attach to a pop-up context menu than you would be able to put in a manually added activity)
  2. My personal favourite is to find which shortcut key is assigned to the option you want on the context menu. For example, if ‘Export to Excel’ has an underlined ‘c’ suggesting it is the keyboard shortcut, you could use ‘Send Hotkey’ activity to use the shortcut.

I hope this helps.

the recorder feature is what i have been using for all of these, attempts. unfortunately there is no hotkey i have found within the JDA application to quickly export.

A less preferred way could be to use ‘Click Image’.
I have used it with quite reliable success. If you’re unable to attach during selector selection, take a screenshot and select image.
Once saved, change the selector from the image editor (e.g. Paint or Snip & Sketch) to the application window.

Hi Tom. You can give this a try . Make Delay after to 0 and delay before to 0 in clicking activities .
If it does not work then as @codenameCata suggested, the last possible way is to use click image activity.

@Sriharisai_Vasi all delays before and after are 0, @codenameCata I tried to take an image click but i do not see a place to change the selector from sniping tool to the application


Please expand the ‘Target’ section in the image above.
The target section contains ‘Selector’ where you can do that.

I could not point the snip it image back to the JDA application however, I did finally get this to work by using a desktop recording a normal click, but inside the attach window ‘Menu’ i took a capture image of the contex menu, then i deleted the captured click in the do function and inserted just a basic mouse click and put in the x / y cord for it to click on manually. very convoluted but it got the job done.

thanks for the help guys.

1 Like

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