Page 1 of 1

FindChild taking a very long time, anything faster

Posted: Tue Dec 18, 2007 8:45 pm
by slim7
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: Select all

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

Posted: Wed Dec 19, 2007 5:48 pm
by Support Team
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: Select all

RxElementIgnoreInvisible(TRUE);
Alex
Ranorex Support Team