This project is read-only.

Finding TreeItems that do not have a HEADER property

Oct 27, 2008 at 11:30 PM

The title of this might be slightly misleading but it's a good start. I am testing a WPF application that uses a TreeView. I can find TreeViewItems if they have a "simple" HEADER property because UIAutomation recognizes the value of the "simple" HEADER property as the Name. But, if there is no HEADER property or if the HEADER definition is complex, UIAutomation has no Name for the item. Here's an example of a header definition that doesn't "work"











<StackPanel Name="PrezStackPanel">




<TextBlock Name="HeaderTextBlock" Text="{Binding Path=President}" />














Ironically, if I could get rid of the StackPanel, UIAutomation recognizes the TextBlock and does give the item a name. Unforuntaely, I can't do that because the app I'm testing has other stuff in the StackPanel.

Anybody have an idea for a workaround?
Jan 8, 2009 at 5:57 PM
Did you find solution to this problem?

Anybody else have an idea for a workaround?

Jan 23, 2009 at 1:07 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.