Ranorex Spy displays the menus (I.e. the File menu) of my AUT as a "Form 'NativePopupMenu'". According to Spy it does not have any children associated. Therefore none of the menu items are available to me.
Currently I have to hard code all the shortcuts (i.e. Alt-F O for Open). But I would really like to be able to read the menu items at run time because the menus can contain different items depending on various states of the AUT.
Spy shows the information:
FlavorName: Win32
Class: WindowsForms10.Window.0.app.0.378734a
Role: Form [form]
Anything I can do here?
Thanks...
P.S. From my last inquiry with you guys, you should have a copy or at least access to get a copy of my AUT. Information was in emai to support.
Ranorex can't see AUTs menu items
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
After playing around with your AUT a bit, I can definitely say that the menubar and the popupmenus are custom implementations and unfortunately do not expose their interior to Ranorex.
However, our upcoming version 2.1 might help because we have integrated a number of imaging functions into the API.
So if you have menu items which might change their location or might even not be there, you can do something like this:
where MyResources.MenuItemTest is a Bitmap (from a resource in this case)
or something like this:
Ranorex then tries to find the correct location by looking for the provided image template in the element on the screen. You can of course tweak imaging settings for speed/robustness etc.
Hope that helps.
Version 2.1 will probably be released in about 2 weeks. If you are interested, we can provide you with a (non-public) beta version early next week.
Michael
Ranorex Team
However, our upcoming version 2.1 might help because we have integrated a number of imaging functions into the API.
So if you have menu items which might change their location or might even not be there, you can do something like this:
Code: Select all
MyRepo.MyMenuBar.Click(new Location(MyResources.MenuItemTest));
or something like this:
Code: Select all
MyRepo.MyMenuPopup.Click(Imaging.Load("MenuItemProjectPlan.png"));
Hope that helps.
Version 2.1 will probably be released in about 2 weeks. If you are interested, we can provide you with a (non-public) beta version early next week.
Michael
Ranorex Team
Thanks for taking a look. I think I will wait on using a non public release for this issue. I have too many other pressing items that still need to be completed and I can handle using keystrokes for the time being. We have a new AUT that is being redesigned with newer components so I will make sure dev understands the need for automation-ability.
Thanks.
Thanks.