UIAMenuItm represents a MenuItem Gui control under windows.It is child control of UIAMenu. A wrapper to UI Automation MenuItem control. UIAMenueItems like UIAMenu implemented as popup and you should make sure they appear on screen before using them.

Namespace:  QAliber.Engine.Controls.UIA
Assembly:  QAliber.Engine (in QAliber.Engine.dll) Version: 1.0.0.0 (1.0.0.0)

Syntax

C#
public class UIAMenuItem : UIAControl
Visual Basic (Declaration)
Public Class UIAMenuItem _
	Inherits UIAControl
Visual C++
public ref class UIAMenuItem : public UIAControl

Examples

CopyC#
Process.Start("calc");
UIAMenu MenuBar = Desktop.UIA[@"Calculator", @"SciCalc", @"UIAWindow"][@"Application", @"", @"MenuBar"] as UIAMenu;

UIAMenuItem viewButton = MenuBar["View"] as UIAMenuItem;
//Open menu
viewButton.Click();
//Look for the new menu popup appeared
UIAMenu viewMenu = Desktop.UIA[@"Calculator", @"SciCalc", @"UIAWindow"][@"Application", @"", @"MenuBar"][@"View", @"", @"Item 2"][@"View", @"#32768", @"UIAMenu"] as UIAMenu;
UIAMenuItem standardOption = viewMenu[@"Standard", @"", @"Item 305"] as UIAMenuItem;
standardOption.Click(MouseButtons.Left,new Point(10,10));

Inheritance Hierarchy

System..::.Object
  QAliber.Engine.Controls..::.UIControlBase
    QAliber.Engine.Controls.UIA..::.UIAControl
      QAliber.Engine.Controls.UIA..::.UIAMenuItem

See Also