Page 1 of 1

Get RxPath during Test Runtime

Posted: Wed Feb 13, 2019 4:23 pm
by semate
Hi there!

Is it possible to find out the RxPath of an object by clicking on it (or hovering) during runtime(!) of the test?
Basically using the Spy functionallity while the test is executing.

Re: Get RxPath during Test Runtime

Posted: Wed Feb 13, 2019 9:05 pm
by ahoisl
Ranorex adapters/elements provide the GetPath method which will calculate and return a RanoreXPath for the element that is unique at the time of calling the method.

If you want to get an element from a specific point on the screen, you can use the Element.FindFromPoint method. As the API documentation says, it will require a Premium license, though, even if you call it in your test execution:
var elementAtScreenLocation = Host.Local.Element.FindFromPoint(new Point(123, 456));
Regards,
Alex
Ranorex Team