Close the combobox

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

The example will luanch IE (wrote for IE7, assuming tabs), expand the combo and using keybord will go down and up the list 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}");
addressCombo.Collapse();

See Also