Relative Rxpath to windows controls

Ask general questions here.
AutoTester
Posts: 6
Joined: Fri Feb 20, 2009 11:26 am

Relative Rxpath to windows controls

Post by AutoTester » Wed Feb 25, 2009 10:47 am

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

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

Post by Support Team » Wed Feb 25, 2009 11:11 am

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

AutoTester
Posts: 6
Joined: Fri Feb 20, 2009 11:26 am

Post by AutoTester » Wed Feb 25, 2009 12:23 pm

Thanks that worked