Retrieve the list of selected items in 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 UIAControl[] SelectedItems { get; }
Visual Basic (Declaration)
Public ReadOnly Property SelectedItems As UIAControl()
Visual C++
public:
virtual property array<UIAControl^>^ SelectedItems {
	array<UIAControl^>^ get () sealed;
}

Remarks

Use CanSelectMultiple to verify the combo allow multiple selection

Examples

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;
UIControl[] selectItems;
addressCombo.Expand();
System.Threading.Thread.Sleep(3000);
IEWin.Write("{DOWN}{DOWN}");
selectItems = addressCombo.SelectedItems;
MessageBox.Show(selectItems[0].Name);

See Also