Getting the Label item from the array of IUIitem

Oct 21, 2010 at 7:38 AM
Edited Oct 21, 2010 at 7:39 AM

Hello,

       I wanted to retrieve a Label object and check for the licenses installed in the About window of the application.  I can not directly identify this label as the Name property itself contains the whole Licenses installed. I wanted to retrieve all the labels in the window and check if the name property  starts with "Licensed Features:". As regular expression object can not be used directly, I have :

IUIItem[] licenseLabel = aboutPage.GetMultiple(SearchCriteria.ByControlType(ControlType.Text));      

I get a array of IUIItem. Could any one please let me know if there is a shorter way without looping through all the elements for Name property containing "Licensed Features:" to get hold of the Lable object?

 

Rohith

Oct 21, 2010 at 7:56 AM

Well, I got the solution by 

Label licenseLabel = (Label) aboutOperations.GetMultiple(SearchCriteria.ByControlType(ControlType.Text)).Where(p => p.Name.Contains("Licensed")).First();

Sorry, for early question....