Check if the combobox is open or close

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

Syntax

C#
public ExpandCollapseState ExpandCollapseState { get; }
Visual Basic (Declaration)
Public ReadOnly Property ExpandCollapseState As ExpandCollapseState
Visual C++
public:
virtual property ExpandCollapseState ExpandCollapseState {
	ExpandCollapseState get () sealed;
}

Examples

The example will luanch IE (wrote for IE7, assuming tabs), expand the combo and using keybord will go doan and up the list verify the state before collapsing the combobox.
CopyC#
System.Diagnostics.Process.Start("IExplore");
System.Threading.Thread.Sleep(3000);
UIAPane IEWin = Desktop.UIA[@"Windows Internet Explorer",true][@"", @"ReBarWindow32", @"UIAPane"][@"", @"Address Band Root", @"UIAPane"] as UIAPane;
UIAComboBox addressCombo = IEWin[@"Address", @"ComboBox", @"UIAComboBox"] as UIAComboBox;
addressCombo.Expand();
System.Threading.Thread.Sleep(3000);
IEWin.Write("{DOWN}{DOWN}{DOWN}");
System.Threading.Thread.Sleep(1000);
IEWin.Write("{UP}");
if (addressCombo.ExpandCollapseState == System.Windows.Automation.ExpandCollapseState.Expanded)
 addressCombo.Collapse();

See Also