Unable to access MenuBar using UISpy

Aug 19, 2008 at 8:50 AM
Hi All,
Mine is a C# application.
I am unable to access the MenuBar using UISpy. On the other hand I can access the windows notepad file menu.
Following are the properties seen in uispy
AutomationElement
  General Accessibility
    AccessKey:    ""
    AcceleratorKey:    ""
    IsKeyboardFocusable:    "False"
    LabeledBy:    "(null)"
    HelpText:    ""
  State
    IsEnabled:    "True"
    HasKeyboardFocus:    "False"
  Identification
    ClassName:    "WindowsForms10.Window.8.app.0.33c0d9d"
    ControlType:    "ControlType.MenuBar"
    Culture:    "(null)"
    AutomationId:    "394312"
    LocalizedControlType:    "menu bar"
    Name:    ""
    ProcessId:    "2068 "
    RuntimeId:    "42 394312"
    IsPassword:    "False"
    IsControlElement:    "True"
    IsContentElement:    "True"
  Visibility
    BoundingRectangle:    "(48, 67, 328, 24)"
    ClickablePoint:    "(null)"
    IsOffscreen:    "False"
ControlPatterns

What property is to be set so that i can access it using UISpy

-Harshad
Aug 19, 2008 at 6:32 PM
try this its works for me!!

           /Core.UIItems.MenuItems.Menu appmenu = getMenuByName(window.MenuBar.TopLevelMenu, "Aplicación"); //the menuname, no the text
           // appmenu.Click();
            //System.Windows.Forms.Application.DoEvents(); //
            //Core.UIItems.MenuItems.Menu menu = getMenuByName(window.MenuBar.TopLevelMenu, "Configuración");
           // menu.Click();

just change the Name string !!
 if u still have problem tell me!!
Aug 22, 2008 at 6:07 AM
Tried using Visual Ui Automation Verify. Worked.
Thanks
-harshad