distinguish between FindChildren & FindDescendants

Ask general questions here.
marcushe
Posts: 112
Joined: Tue Apr 14, 2009 6:38 am

distinguish between FindChildren & FindDescendants

Post by marcushe » Thu Jun 18, 2009 3:52 am

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?

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: distinguish between FindChildren & FindDescendants

Post by Support Team » Thu Jun 18, 2009 12:09 pm

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
.
Image

marcushe
Posts: 112
Joined: Tue Apr 14, 2009 6:38 am

Re: distinguish between FindChildren & FindDescendants

Post by marcushe » Fri Jun 19, 2009 1:41 am

Thanks ,Guys.