Ranorex

How to select third and fourth level menu.

 
Post new topic   Reply to topic    Ranorex Forum Index -> RanorexNet
View previous topic :: View next topic  
Author Message
prashantb



Joined: 23 Aug 2007
Posts: 9

PostPosted: Mon Aug 27, 2007 3:19 pm    Post subject: How to select third and fourth level menu.
I am using C# to test my application. I want to select Third level sub menu like "File > New > Project"

I am using following method but it won't work.
ret = MenuControl.SelectItemText("File", "New", "Project");

Also, please tell me how can I select fourth level Menu like "File>ABC>EFG>XYZ"
_________________
Regards,
Prashant Barhate
Back to top
View user's profile Send private message
admin
Site Admin


Joined: 05 Jul 2006
Posts: 351

PostPosted: Wed Aug 29, 2007 1:31 am    Post subject:
There are a lot of menu implementations from Microsoft and from other companies.
Ranorex also has more possibilities to access menu items, please give us the following information:

Is your application a .NET2003, .NET2005 or an older application?
Has your menu bar a control name?

Jenö Herget
Ranorex Team
Back to top
View user's profile Send private message Visit poster's website
prashantb



Joined: 23 Aug 2007
Posts: 9

PostPosted: Wed Aug 29, 2007 7:12 am    Post subject:
Hi Jeno,
I am testing Visual Studio 2005 Add-in. Hence the menus I am referring here are Visual Studio 2005 IDE menus. These Menu have class name as MsoCommandbar. Ranorex is able to recognize it as Menu but it was not selecting third level menu item i.e. "File -> New -> Project"
_________________
Regards,
Prashant Barhate
Back to top
View user's profile Send private message
admin
Site Admin


Joined: 05 Jul 2006
Posts: 351

PostPosted: Thu Aug 30, 2007 1:21 am    Post subject:
We have a sample for Visual Studio automation in the Samples directory of the Ranorex Installation: RanorexVS2005Automation.
Please check this sample, we open the new project dialog as follows:

Code: click into code to enlarge
// Visual Studio has an old style menu bar, not a menu strip
Menu menu = new Menu(form);
if (menu == null)
{
    Console.WriteLine("ERROR: menu not found ");
    return 1;
}

// Select the File - New - Project menu
menu.SelectItemText("File", "New", "Project...");


Jenö
Ranorex Team
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Ranorex Forum Index -> RanorexNet All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum