Page 1 of 1
distinguish between FindChildren & FindDescendants
Posted: Thu Jun 18, 2009 3:52 am
by marcushe
In help file ,there are two method to make me confused ,FindChildren & FindDescendants.
Can you give some introduction??
What's immidiate children??
Diffrience from descendants?
Re: distinguish between FindChildren & FindDescendants
Posted: Thu Jun 18, 2009 12:09 pm
by Support Team
Children and descendants refer to the tree of UI elements shown in Ranorex Spy. The children of an element P are the elements in the next level of the tree that have P as parent. The descendants of element P are all the elements in the subtree underneath P, i.e. the children of P, the children of the children, and so on. See the following graphical example:
Code: Select all
Element
|- Child/Descendant 1
|- Child/Descendant 2
| \- Descendant 21
| \- Descendant 22
|- Child/Descendant 3
\- Child/Descendant 4
\- Descendant 41
\- Descendant 411
You can also use RxPath to achieve the same functionality:
FindChildren<Button>() for example is equivalent to
Find<Button>("button").
Regards,
Alex
Ranorex Support Team
Re: distinguish between FindChildren & FindDescendants
Posted: Fri Jun 19, 2009 1:41 am
by marcushe
Thanks ,Guys.