Skip to main content


Return the automation control text.

public string Text;

Return Value

The text value of the automation control, such as the window caption or button text. This is the Name field of the underlying windows AutomationElement.

Note that some automation controls may not have text readable by this method.

For many AutomationControl types it many be necessary to read text content via the AutomationElement e.g.



AutomationControl wind_1 = FindTopAutomationWindow("", "");
if (wind_1.Text.Contains("SomeText"))