FindChildren with Infragistics-WinGrid : Automation API

FindChildren with Infragistics-WinGrid

Class library usage, coding and language questions.

FindChildren with Infragistics-WinGrid

Postby Schuco » Mon Apr 28, 2008 11:13 am

It's no problem to retrieve the rows:
Element[] rows = parent.FindChildren(Role.Row);

My problem is when the Grid is filtered, I always get all rows and the rows only differ in their state ( Invisible ), for 4000 rows FindChildren runs at least 15 minutes, is there a workaround for retrieving only visible rows?
Everybody here ... comes from somewhere ...
Schuco
 
Posts: 9
Joined: Thu Feb 21, 2008 5:16 pm
Location: Ternitz

Postby Support Team » Mon Apr 28, 2008 11:44 am

You can set the Element.IgnoreInvisible property to true. That way, invisible elements will be ignored in the FindChild(ren) methods.

Regards,
Alex
Ranorex Support Team
User avatar
Support Team
Site Admin
 
Posts: 4842
Joined: Fri Jul 07, 2006 5:30 pm
Location: Graz, Austria

Postby Schuco » Mon Apr 28, 2008 11:59 am

Support Team wrote:You can set the Element.IgnoreInvisible property to true. That way, invisible elements will be ignored in the FindChild(ren) methods.

Regards,
Alex
Ranorex Support Team


That does not work faster.
Everybody here ... comes from somewhere ...
Schuco
 
Posts: 9
Joined: Thu Feb 21, 2008 5:16 pm
Location: Ternitz

Postby Support Team » Mon Apr 28, 2008 2:06 pm

If Element.IgnoreInvisible is set, the FindChildren method should skip all invisible rows. That should enhance the search performance.
Could you please check if the state of the invisible row elements is indeed State.Invisible?
Code: Select all
bool isInvisible = (row.State & State.Invisible) != 0;

Alex
Ranorex Support Team
User avatar
Support Team
Site Admin
 
Posts: 4842
Joined: Fri Jul 07, 2006 5:30 pm
Location: Graz, Austria

Postby Schuco » Mon Apr 28, 2008 2:39 pm

Support Team wrote:If Element.IgnoreInvisible is set, the FindChildren method should skip all invisible rows. That should enhance the search performance.
Could you please check if the state of the invisible row elements is indeed State.Invisible?
Code: Select all
bool isInvisible = (row.State & State.Invisible) != 0;

Alex
Ranorex Support Team


I tried it with a for-loop, only the invisible rows have state:Invisible
If I step through the children with a for-loop, the higher the count ( up to 3970 ) the worse the performance !! Even when I loop through them backwards !!
Everybody here ... comes from somewhere ...
Schuco
 
Posts: 9
Joined: Thu Feb 21, 2008 5:16 pm
Location: Ternitz

Postby Support Team » Tue Apr 29, 2008 5:26 pm

In fact, the FindChildren did not react to the Element.IgnoreInvisible property. We've fixed that bug in the current Ranorex version (1.4.0.5) available at:
http://www.ranorex.com/download.html

Regards,
Alex
Ranorex Support Team
User avatar
Support Team
Site Admin
 
Posts: 4842
Joined: Fri Jul 07, 2006 5:30 pm
Location: Graz, Austria


Return to Automation API

Who is online

Users browsing this forum: No registered users and 1 guest