Action Invocation doesn't work in Spy

Ranorex Spy, Recorder, and Studio.
MartinKubal
Posts: 10
Joined: Wed Aug 16, 2017 8:16 pm

Action Invocation doesn't work in Spy

Post by MartinKubal » Fri Nov 24, 2017 12:02 pm

Hi,
I have application that has some MenuItems which show list of other options, regular Menu bar like in any Windows application (File, View and so on). But Spy won't recognize these lists of options. When I try to invoke select or DoDefaultAction this message will appear:

Code: Select all

Invoking action 'Select' failed:
Action 'select' failed on element '{MenuItem:File}'. The operation is not supported. Member not found. (Exception from HRESULT: 0x80020003 (DISP_E_MEMBERNOTFOUND))
Is there any way how to solve it?
Attachments
menu.jpg
I mean these options like Defaults, Expand all, Collapse all
menu.jpg (29.62 KiB) Viewed 456 times

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 3945
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Action Invocation doesn't work in Spy

Post by odklizec » Fri Nov 24, 2017 12:32 pm

Hi,

If the invoke action does not work in Spy, then it's most probably not implemented properly in the AUT? The error messages clearly says it... "The operation is not supported".

Is there a reason why you want to use Invoke action, instead of UI approach (mouse click)? You see, using invocation-based action is not exactly user-like approach and you should use it only if there is really no other way to do what you want.
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

MartinKubal
Posts: 10
Joined: Wed Aug 16, 2017 8:16 pm

Re: Action Invocation doesn't work in Spy

Post by MartinKubal » Fri Nov 24, 2017 12:54 pm

I underdstand that. There is no need for invoking, I need to map the options into repository. I am not able to see these options in spy so I was only trying to invoke click to make it visible for Spy, but this won't work.

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 3945
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Action Invocation doesn't work in Spy

Post by odklizec » Fri Nov 24, 2017 1:55 pm

I think your problem is solvable by Instant Tracking feature, described here:
https://www.ranorex.com/help/latest/les ... ntTracking
Basically, you click "File" menu, move mouse above the desired sub-menu option and press shortcut Ctrl+Left Win. This should highlight the menu item under the mouse and add it to repo.

Another possibility is to start normal Tracking mode in spy, then press and hold F12 key, to pause tracking, then click File menu, move mouse above desired sub-menu and finally release F12 key. Hope this helps? ;)
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

MartinKubal
Posts: 10
Joined: Wed Aug 16, 2017 8:16 pm

Re: Action Invocation doesn't work in Spy

Post by MartinKubal » Fri Nov 24, 2017 2:56 pm

Well Instant tracking won't help, but Recorder did. I didn't use it for long time so I completely forgot it. It is solved.

Thanks for replies.