New to Telerik Test Studio? Download free 30-day trial


How to read WPF AutomationProperties in Test Studio.


Automation properties are defined as a set of an attached properties of a WPF element, so you can read them using GetAttachedProperty method. Here's an example of how to read the ItemStatus property:

var itemStatus = <Your-Wpf-Element>.GetAttachedProperty<string>("System.Windows.Automation.AutomationProperties", "ItemStatus");

Note The code above will work only when automation property values are set in the XAML of your WPF application.

In this article