Find, FindSingle and 'partial' ranorexPaths
Posted: Thu Oct 25, 2012 5:29 pm
There is something that I want to do, but I don't know if it's possible. I have a WebDocument (although the general question could also apply to a Form, I think) that I've gotten via the command:
WebDocument myWebDocument = "/dom[@domain='172.22.33.44']";
Now I want to find a flex element that is deep in the hierarchy of the dom. I know the element I'm looking for is unique in the sense that it has a unique ID attribute. What I'd LIKE to do is issue a command like:
Ranorex.FlexElement elem = myWebDocument.FindSingle["checkbox[@id='myUniqueID']");
However, this doesn't work. It only seems to work if I put in the long path ("body/flexobject/container/container/container...").
So, is there a way to just really zero in on the element the way I've described (with less than a full path), regardless of the container hierarchy?
Thanks!
WebDocument myWebDocument = "/dom[@domain='172.22.33.44']";
Now I want to find a flex element that is deep in the hierarchy of the dom. I know the element I'm looking for is unique in the sense that it has a unique ID attribute. What I'd LIKE to do is issue a command like:
Ranorex.FlexElement elem = myWebDocument.FindSingle["checkbox[@id='myUniqueID']");
However, this doesn't work. It only seems to work if I put in the long path ("body/flexobject/container/container/container...").
So, is there a way to just really zero in on the element the way I've described (with less than a full path), regardless of the container hierarchy?
Thanks!