Ranorex

FindChild taking a very long time, anything faster

 
Post new topic   Reply to topic    Ranorex Forum Index -> RanorexCore
View previous topic :: View next topic  
Author Message
slim7



Joined: 18 Dec 2007
Posts: 1

PostPosted: Tue Dec 18, 2007 9:45 pm    Post subject: FindChild taking a very long time, anything faster
I have a tabbed app written in old foxpro and each tab has many controls on it. the parent app i get by class name contains all the tabs. And so when i do a search for these controls its terribly slow. Is this because i have so many tabs w/ lots of controls on it. Is there a faster way to search for the controls. It finds the controls eventually but ends up the test we have written is way too slow. Thanks for any ideas.....??????????
Code: click into code to enlarge

Ranorex.Form parent= Ranorex.Application.FindFormClassName("className",2);
Element _el = parent.Element.FindChild(Role.Text, element_name);


Most of these are Role.Text
Back to top
View user's profile Send private message
Support Team
Site Admin


Joined: 07 Jul 2006
Posts: 200

PostPosted: Wed Dec 19, 2007 6:48 pm    Post subject:
You can first try to search for a single tab page and then search that tab page for your controls. That avoids searching the first tab page if you e.g. search for a control in the second one.

Generally, it's also much faster to search for controls (i.e. by control id) than searching by elements, as every control has a large number of elements, and thus the number of elements is far greater than the number of controls.

And the last thing you may try is to search only for visible elements (supported only in Ranorex Pro):
Code: click into code to enlarge
RxElementIgnoreInvisible(TRUE);


Alex
Ranorex Support Team
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Ranorex Forum Index -> RanorexCore All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum