Close the menu.

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

Syntax

C#
public void Collapse()
Visual Basic (Declaration)
Public Sub Collapse
Visual C++
public:
virtual void Collapse() sealed

Examples

CopyC#
System.Diagnostics.Process.Start("notepad");
 UIAWindow notepadWin = Desktop.UIA[@"Untitled - Notepad", @"Notepad", @"UIAWindow"] as UIAWindow;
 UIAMenuItem fileMenue = notepadWin[@"Application", @"", @"MenuBar"][@"File", @"", @"Item 1"] as UIAMenuItem;
 fileMenue.Expand();
 System.Threading.Thread.Sleep(3000);
 if (fileMenue.ExpandCollapseState == System.Windows.Automation.ExpandCollapseState.Expanded)
      fileMenue.Collapse();

See Also