Issues accessing menu items in an MFC based application
In my application being tested I have been able to access the menus on the menu bar via the following name mapping:
Aliases.TrussStudioProcess.LayoutFrame.TopDockBar.LayoutMenuBar
I can access the menu using index numbers like this:
Aliases.TrussStudioProcess.LayoutFrame.TopDockBar.LayoutMenuBar.ClickItem(0, true);
In this example the File menu, which is the first menu on the left, is clicked and opened.
The problem I am having is that the menu will not stay open so I can name map it. If I record selecting something off of a menu TestComplete maps the menu item list to 'Item'. So I am only able to script the opening of a menu but not the selection of an item on the displayed list.
How do I get the menus to stay open long enough so that I can name map them to names like FileMenuList, ApplicationMenuList, etc.? I am using JavaScript if that makes a difference in the answer.
I have already tried everything in the 'Addressing Menu Items' article in the Help section for Desktop testing and was unable to get anything suggested to work.