how can i work with Treeview if Treeview have no Automation id and name

May 14, 2010 at 5:47 AM

HI All,


 i am a new in issue is that i have treeview but this treeview have no automation id and name..

pls let me know how can i work with treeview without automation id and name

May 17, 2010 at 7:51 AM



use the ControlType


Tree tree = element.Get<Tree>(SearchCriteria.ByControlType(ControlType.Tree));


on WPF you can also use

IUIItem[] items = element.GetMultiple(SearchCriteria.ByControlType(ControlType.Tree));


if there  are more than one tree on the same element in visual tree (see UIAVerify or UISpy)