The UI Automation framework has a base class, AutomationElement, that has a property, ItemStatus, that can be used to store arbitrary strings. I’m trying to get that property from the Visual Studio 2010 Coded UI Tests base class, UITestControl.
The UI Automation framework has a base class, AutomationElement , that has a property,
Share
Look at the Coded UI Tests generated code for
WpfControl. It has a property, NativeElement. This property is anAutomationElement.You can write an extension method to cast it and get ItemStatus.
I am not certain why NativeElement is recorded as an
object(which makes the getter cast redundant). All WPF controls’ NativeElement are of typeAutomationElement. I would suggest editing the generated code and simply callingcontrol.NativeElement.Current.ItemStatusdirectly.