Problem nesting ElementFindChildren calls...

Class library usage, coding and language questions.
Posts: 15
Joined: Wed May 23, 2007 11:12 pm

Problem nesting ElementFindChildren calls...

Post by vonBrabant » Mon Jun 23, 2008 11:00 pm


I use ElementFindChildren() together with ElementGetChildFieldItem() to iterate over the elements of a form. That works fine.

I perform the DefaultAction for each element which opens a new window in which I again have to find certain elements. I do that with ControlGetElement() and ElementFindChild() and then close this window which brings me back to my first window.

If I now want to continue my ElementGetChildFieldItem() loop things go wrong. ElementDoDefaultAction no longer works and it seems that the nested calls to ElementFindChild() messed something up with ElementGetChildFieldItem().

Then I tried to first iterate over all ElementGetChildFieldItem() calls and collect the returned elements in a list. After this loop finished I then iterated over the list of collected elements. But unfortunately this didn't work either :-(

Any idea what could be the problem ?

Many thanks,


User avatar
Support Team
Site Admin
Site Admin
Posts: 12169
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA

Post by Support Team » Wed Jun 25, 2008 1:27 pm

Can you please try the same without element caching:

Code: Select all

Ranorex.ElementEnableCaching = False
Ranorex Team