Hi,
Am trying to automate the Microsoft Dynamics GP 2010. I have a problem in invoking GP, can any one provide me C# code for selecting the submenu of a menubar
Am able to select till "File" Menu item, Ranorex not recognizing the Context Menu object.
Please suggest me how to select the context menu "Open Launch File... Ctrl + o" of "File" Menu Item.
Almost my issue resembles the same as Calculator (Menus -> Menubar -> Menuitems -> ContextMenu)
In My case
"Application" is the Main Menu Bar
/form[@title='Dexterity Runtime']/menubar[@accessiblename='Application']
"File" is the Menuitem of Application
/form[@title='Dexterity Runtime']/menubar[@accessiblename='Application']/menuitem[@accessiblename='File']
"Open Launch File... Ctrl + 0" is the Submenu of File
//contextmenu[@processname='Dynamics']/contextmenu/menuitem[@accessiblename~'^Open\ Launch\ File\.\.\.Ctrl\+']
Please let me know the c# code using (Ranorex) ASAP
Thanks in advance
Kumar
Need C# Cod to click the Submenu of Window based Application
Re: Need C# Cod to click the Submenu of Window based Application
Hi,
My issue almost resemble like Calculator Menu's
Please let me know the code for selecting the context menu.
Regards
Kumar
My issue almost resemble like Calculator Menu's
Please let me know the code for selecting the context menu.
Regards
Kumar
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Need C# Cod to click the Submenu of Window based Application
Hi,
Here is an example for Windowx XP calculator to select a context menu item.
http://www.ranorex.com/support/user-gui ... rding.html
Regards,
Peter
Ranorex Support Team
Here is an example for Windowx XP calculator to select a context menu item.
//Open context menu Ranorex.MenuItem editMenu = Host.Local.FindSingle("/form[@title='Calculator']/menubar[@accessiblename='Application']/menuitem[@accessiblename='Edit']"); editMenu.Click(); //Select your context menu item Ranorex.MenuItem contextItem = Host.Local.FindSingle("/contextmenu[@processname='calc']/contextmenu/menuitem[@accessiblename='PasteCtrl+V']"); contextItem.Select();You can also use the code generated by the Ranorex Recorder. Just record the actions and let the Recorder generate the code for you, see the corresponding section in the Ranorex User Guide:
http://www.ranorex.com/support/user-gui ... rding.html
Regards,
Peter
Ranorex Support Team
Re: Need C# Cod to click the Submenu of Window based Application
Hi,
Now am able to get the values of submenus using
Ranorex.Menuitem Filemenu = Host.Local.FindSingle("/form[@title='Dexterity Runtime']/menubar[@accessiblename='Application']/menuitem[@accessiblename='File']");
IList <Ranorex.unknown> uk = Filemenu.Children;
but not able to click the submenu and on execution it clicks the top most browser window.
Any one know how to set focus the submenu and click the respective item.
Thanks in advance
Now am able to get the values of submenus using
Ranorex.Menuitem Filemenu = Host.Local.FindSingle("/form[@title='Dexterity Runtime']/menubar[@accessiblename='Application']/menuitem[@accessiblename='File']");
IList <Ranorex.unknown> uk = Filemenu.Children;
but not able to click the submenu and on execution it clicks the top most browser window.
Any one know how to set focus the submenu and click the respective item.
Thanks in advance
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Need C# Cod to click the Submenu of Window based Application
Ranorex can only click on menu items when the menu is open, otherwise it can't calculate the screen location of the menu items. Consequently, you have to click the "File" menu item first to open the menu.kumarm100 wrote:but not able to click the submenu and on execution it clicks the top most browser window.
Filemenu.Click();I suggest you read through the Ranorex Tutorial; it answers most of the questions that new Ranorex users have.
Regards,
Alex
Ranorex Team