how to retrieve a text for controlType.Custom

Nov 17, 2010 at 1:37 AM
Edited Nov 17, 2010 at 6:43 AM


I am encoutnering problem in retrieving text from a COntrol Type = Control.Custom. I am given the Autoamtion Id and Name but still not able to retrieve the text. can someone please help? I have used the below code however not been able to retrieve the text and the count. Thanks in advance,



AutomationElementCollection AllLabels = mainWindow.AutomationElement.FindAll(TreeScope



new PropertyCondition(AutomationElement.AutomationIdProperty, "Id"



Label test = new Label(element, mainWindow.ActionListener); - this brings the single line ,what is the syntax for the collection.? Please help