Problem nesting ElementFindChildren calls... : Automation API

Problem nesting ElementFindChildren calls...

Class library usage, coding and language questions.

Problem nesting ElementFindChildren calls...

Postby vonBrabant » Tue Jun 24, 2008 12:00 am

Hi,

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,

vonBrabant
vonBrabant
 
Posts: 15
Joined: Thu May 24, 2007 12:12 am

Postby Support Team » Wed Jun 25, 2008 2:27 pm

Can you please try the same without element caching:

Code: Select all
Ranorex.ElementEnableCaching = False

Jenö
Ranorex Team
User avatar
Support Team
Site Admin
 
Posts: 4845
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 0 guests