Hiya
Can you explain the different between:
myForm.FindSingle(of ranorex.text)("container/text[@controlid='102']")
and
myForm.FindSingle(of ranorex.text)("descandant::text[@controlid='102'")
I would of thought they are the same, but infact the first one fails, and the second one works
FindSingle method
- Support Team
- Site Admin
- Posts: 12167
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Graz, Austria
Re: FindSingle method
"descendant::..." means any child, grand child, or grand grand child, ... - so the whole subtree is searched. "/" or "child::..." corrsponds only to direct children.
Regards,
Alex
Ranorex Support TEam
Regards,
Alex
Ranorex Support TEam
Re: FindSingle method
Yes i agree but what does FindSingle need this?
- Support Team
- Site Admin
- Posts: 12167
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Graz, Austria
Re: FindSingle method
I don't really understand your question, sorry!
FindSingle searches for the specified path and returns the first matching element. If in your case the first path does not work, but the second one does, it looks like the element you are searching (with controlId '102') is not inside that container (as the first path assumes), but somewhere deeper in the element tree.
Regards,
Alex
Ranorex Support Team
FindSingle searches for the specified path and returns the first matching element. If in your case the first path does not work, but the second one does, it looks like the element you are searching (with controlId '102') is not inside that container (as the first path assumes), but somewhere deeper in the element tree.
Regards,
Alex
Ranorex Support Team