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

May 14, 2010 at 6:47 AM

HI All,

 

 i am a new in Treeeview.my 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 8:51 AM

Hi

 

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)

 

Throndorin