How does ranorex detect relative paths?

Ask general questions here.
d.teusner
Posts: 2
Joined: Wed Oct 07, 2015 2:24 pm

How does ranorex detect relative paths?

Post by d.teusner » Wed Oct 07, 2015 2:42 pm

Hi,

I am fairly new to ranorex and am still experimenting with it. What I am trying to do is to create simple record, that just navigates through the main menu of our software. The menu structure looks like this:
Menu structure.jpg
Menu structure.jpg (85.66 KiB) Viewed 1040 times
To tell ranorex where to find a specific menu-item I can either give it the absolute path or some relative path. The following picture shows what ranorex did while recording and how I changed the paths in order to get the record straight:
Snap_2015.10.07_15h31m10s_003.png
Snap_2015.10.07_15h31m10s_003.png (34.64 KiB) Viewed 1040 times
1. MainWindow: thats the name of our basic frame. Below this item I put the absolute paths of the menus, that ranorex should look for and open.

2. C3Standalone: thats the executable's name of our software.
In the rooted folder "List" I entered the relative paths to the menu items.
In the rooted folder "Copy_of_list" are the original paths, that ranorex recorded.

My Record consists of four mouse actions, where each step opens another level of the menu:
Vorgaben > Auftrag > Verzollung > Packstückart

When I set in each step the repository item to the entries of "Copy_of_list" the test fails. If I just use the entries from "MainWindow" or "C3Standalone > List" the record suceeds.

I am asking myself, why ranorex does neither create the absolute paths nor the relative paths as I did. Is there some setting that I have to activate? Is it some sort of problem of how we build our GUI?

We want to test all our menu items, but changing all those paths from hand is impossible. So I want ranorex to either create proper absolute or relative paths.

Yours David

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

Re: How does ranorex detect relative paths?

Post by Support Team » Fri Oct 09, 2015 1:42 pm

Hi David,
Welcome to Ranorex :)
Basically, there exist three ways to generate the RanoreXPath during recording or tracking elements using Ranorex tools.

StepCostReduce
Reduces the number of path predicates such that the path remains non-ambiguous. In addition to that, removes intermediate steps considered as unimportant. Can be heavily tuned using the RxPath.PathBuildMode settings. This usually shortens the path and makes it more robust by eliminating unnecessary attributes.

Reduce
Reduces the number of path predicates such that the path remains non-ambiguous. This usually shortens the path and makes it more robust by eliminating unnecessary attributes.

Simple
No optimization is performed. Path predicates contain valid, appropriate and existing attribute values or indexes if no attributes can be used.

You can find this setting in the “Global Settings” Dialog under the “Advanced” tab as shown below
GlobalSettingsPathBuildMode.png
GlobalSettingsPathBuildMode.png (20.89 KiB) Viewed 1025 times
To analyze why Ranorex can’t find the corresponding element during the replay I’d need additional information. Therefore, I’d like to ask you if you could provide a Ranorex Snapshot and your Ranorex Solution containing a Ranorex Report that illustrates the error in detail.

PS: If you don’t want to post these documents in this public forum, you could also send them to [email protected]

Thank you in advance,
Regards,
Markus (S)
.
Image

d.teusner
Posts: 2
Joined: Wed Oct 07, 2015 2:24 pm

Re: How does ranorex detect relative paths?

Post by d.teusner » Mon Oct 19, 2015 8:24 am

Hi Markus,

I finally came around to create the information you wanted and added them to the post. You will find the report within the folder.

I tried to take a snapshot of the submenu item "Entfernungswerke" but it was unsuccessful, since ranorex spy claimed, that the item is invalid, as you can see in the screenshot below.
Snap_2015.10.19_09h10m44s_001.png
Snap_2015.10.19_09h10m44s_001.png (116.57 KiB) Viewed 1009 times
If it is any help I can show you the problem on my computer.

Looking forward hearing from you.

Yours David
Attachments
Ranorex.rar
(852.55 KiB) Downloaded 44 times

JimLin
Posts: 38
Joined: Mon Jun 02, 2014 4:23 pm

Re: How does ranorex detect relative paths?

Post by JimLin » Mon Oct 19, 2015 11:04 am

Hi Marcus,

It would be really great if you could provide an indepth explanation of how the RxPath.PathBuildMode settings work.

The 'Edit RanoreXpath Build Options' screen appears to be a very complicated screen and knowing what the % settings at the top mean and what the items in the table below represent and how everything affects everything else; does adjusting one thing change the response of something else?. There are no details, other than 'Can be heavily tuned using the RxPath.PathBuildMode settings', in any of the Ranorex documentation, or elsewhere on the internet.

Regards,
James

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

Re: How does ranorex detect relative paths?

Post by Support Team » Wed Oct 21, 2015 12:03 pm

Hi all,

@David: It would be great if you could show me the problem directly on your machine. Please contact me by email ([email protected]) to discuss the next steps in more detail.

@James:
Basically, the Path Build Options are used to adapt the StepCostReduce generation mode, but it is not recommended changing values inside this dialog since it can cause any unexpected side-effects.

Regards,
Markus (S)
.
Image