Read the text from the combobox, text of selected item

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

Syntax

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

Return Value

The text of the combo selected item as it appear in the combobox when its closes, or null if no text was found

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;
addressCombo.Expand();
System.Threading.Thread.Sleep(3000);
IEWin.Write("{DOWN}{DOWN}{DOWN}");
System.Threading.Thread.Sleep(1000);
addressCombo.Collapse();
MessageBox.Show(addressCombo.Text);

See Also