Page 1 of 1

Dynamically inquire all controls on form

Posted: Fri Mar 11, 2011 6:15 pm
by AKalytiuk
Hi,

Please tell, does Ranorex framework provides way to dynamically inquire and get all child controls from certain form (in order to find certain control on form)?

Actually I need to scan whole tree of controls in Eclipse main form in order to find controls with certain labels. Using XPath for finding controls in Eclipse is not stable as all controls are identified only by dynamic numeric IDs that change depending on set of sub-windows that are currently active.

I have noticed that it is possible to inquire all child controls of some item in repository using Children property of adapter while I have not found a way how to inquire all child controls of some controls-folder (repository folder) that corresponds to form or to some container control.

Please tell is it possible to instantiate adapter for form using XPath expression?

Please point me to manual about framework where it is possible to read about instantiating adapters for any control that is recognized by Spy.

Thanks.

Regards.
Andrii Kalytiiuk

Re: Dynamically inquire all controls on form

Posted: Fri Mar 11, 2011 7:00 pm
by Ciege
By getting an ilist of elements you can then loop through that list and inquire about each element.

Here are a couple of links for you to read:
http://www.ranorex.com/forum/post7611.h ... list#p7611
http://www.ranorex.com/forum/post5612.h ... list#p5612
http://www.ranorex.com/forum/post4995.h ... list#p4995

You can search the forum for more comments about ilist and using for each to iterate through that list of elements.

Re: Dynamically inquire all controls on form

Posted: Mon Mar 14, 2011 7:30 pm
by Support Team
AKalytiuk wrote:Please tell is it possible to instantiate adapter for form using XPath expression?
The following section in the Ranorex User Guide should also help:
http://www.ranorex.com/support/user-gui ... html#c3202

Regards,
Alex
Ranorex Team