Skip to main content


Return the Control text.

public string Text;

Return Value

The text value of the control, such as the window caption, button text or status bar.

Note that some controls may not have text readable by this method that calls the Win32 API GetWindowText(HANDLE);

Using the AutomationControl Text method may be successful.


Control wind_1 = FindTopWindow("", "");
if (wind_1.Text.Contains("SomeText"))

string myText = myControl.ToAutomationControl.Text // convert to an automation control to read the text.