How to count list Items ?

Aug 27, 2008 at 9:43 AM
Edited Aug 27, 2008 at 10:46 AM
I am very new to White framework.

In my application I am having a GroupBox  which lists some errors. The count of  these Errors(ListItems) vary. How can I count the no. of Rows in GroupBox. ?

What I am doing is :

            searchcriteria = SearchCriteria.ByControlType(typeof(GroupBox));
            groupbox = (GroupBox)window.Get(searchcriteria);
            searchcriteria = SearchCriteria.ByControlType(typeof(ListView));
            ListView lw = (ListView)window.Get(searchcriteria);
            double count = lw.Rows.Count;

Sep 2, 2008 at 8:33 PM
Does your groupbox contain a listview? If yes the you should try to get the ListView directly from window instead of getting the groupbox first.
Sep 2, 2008 at 8:41 PM
Edited Sep 2, 2008 at 8:54 PM
Hi Vivek

Thanks for the reply. I found the problem. I had to search it as  Core.UIItems.ListItems.Count

But thankyou very much.