Page 1 of 1

Relative Rxpath to windows controls

Posted: Wed Feb 25, 2009 10:47 am
by AutoTester
Hi

Is there a way of getting relative path from the window, For example
There is a main window, and a child window and child window has controls say button. I want to get the relative path from the child window to controls. At the moment i can only get the path from themain window.

May be somebody has already done that

Posted: Wed Feb 25, 2009 11:11 am
by Support Team
Try calling

GetPath(PathBuildMode buildMode, Element relativeToElement)

on an Element instance.
(if you have an Adapter of some kind you can get the element instance
by using the .Element property)

e.g.

Form myWindow = ...
Button myButton = ...

RxPath theRelativePath = myButton.Element.GetPath(PathBuildMode.Reduce, myWindow);

Michael
Ranorex Team

Posted: Wed Feb 25, 2009 12:23 pm
by AutoTester
Thanks that worked