Retrieve the text from the document control.

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

string of the Text or an empty string if no text found

Examples

Launch notepad and reat text.
CopyC#
System.Diagnostics.Process.Start("notepad");
System.Threading.Thread.Sleep(2000);
UIAWindow notepadWin = Desktop.UIA[@"Untitled - Notepad", @"Notepad", @"UIAWindow"] as UIAWindow;
UIADocument doc = notepadWin[@"", @"Edit", @"15"] as UIADocument;
doc.Write("Hello World");
MessageBox.Show(doc.Text);

See Also