Ranorex XPath without Spy

Ask general questions here.
AppTester
Posts: 20
Joined: Thu Sep 29, 2011 12:11 am

Ranorex XPath without Spy

Post by AppTester » Thu Mar 29, 2012 6:00 pm

I have a situation where I have the Ranorex Developer licence installed in my machine (where I create the tests), and a runtime licence installed on another box where the test need to run. At one point in the test there is an error dialogue box that comes up and its OK button needs to be clicked to continue. The issue is that I've been trying to reproduce the error window on my machine (with the dev license), but with no luck. I've tried everything for over two weeks, but it seems impossible to reproduce the error window on my machine. But sure enough, it always appears on the machine with the run time.

All I need is to simply get the XPath of the error window and its button. If I could the tests can continue, and my headache is gone. But I can't for the reason explained above.

Is there any way I can get the XPath of a UI element without Spy? Spy will not work on the machine with just a runtime. Please let me know.

Please help.

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

Re: Ranorex XPath without Spy

Post by Support Team » Fri Mar 30, 2012 12:28 pm

Hi,

You can try to create a Ranorex Snapshot file of the entire application (from the root element), therefore you can use the following Code Module.
Please write us if you were able to get the RxPath with the Snapshot file?

Regards,
Markus
Ranorex Support Team
.
Image

AppTester
Posts: 20
Joined: Thu Sep 29, 2011 12:11 am

Re: Ranorex XPath without Spy

Post by AppTester » Tue Apr 03, 2012 8:29 pm

There is an issue on step 2 at this link: http://www.ranorex.com/forum/create-sna ... t2447.html

The step says:
Variables:
SnapshotName
The name of the Ranorex Snapshot file.

ElementPath
The RanoreXPath of the desired system under test.
What do I name the SnapshotName variable?
For ElementPath, what is RanoreXPath? Which one? There are so many in my test application. Also what do you mean by "the desired system under test"? The program we are testing?

When followed the step, compiled the test, and put the exe on the machine with the runtime license, I could not find any Snapshot file.

If possible, could you please give more detailed, step-by-step instructions.

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

Re: Ranorex XPath without Spy

Post by Support Team » Wed Apr 04, 2012 12:03 pm

Hi,
AppTester wrote:What do I name the SnapshotName variable?
For example "C:\temp\yoursnap.rxsnp"
AppTester wrote:For ElementPath, what is RanoreXPath? Which one? There are so many in my test application. Also what do you mean by "the desired system under test"? The program we are testing?
Just the RxPath to your element. If you want the whole form use a RxPath like "/form[@name='YourForm]"
If you want a specific element you have just to copy the absolute path from your repository. The absolute path you will find in the properties pad of your element inside the repository.

Regards,
Peter
Ranorex Team
.
Image