Page 1 of 1

Question on StepCostReduce

Posted: Fri Jul 25, 2014 3:24 pm
by brentmclauclan
Hi there

Can anyone shed a little light on the meaning of this in the Global Settings - Advanced Tab

RanoreXPath generation mode: StepCostReduce - vs - Reduce - vs - Simple

Thanks

Brent

Re: Question on StepCostReduce

Posted: Fri Jul 25, 2014 4:17 pm
by krstcs
Brent, I looked and didn't find much on these settings in the User Guide or in the forums. I agree that they probably need some more thorough documentation.

I would suggest that you experiment with them a bit. Find a UI object that has a deep path and Track it in the repository with each of the settings. This should show you the differences. Note that you will probably need to do this in 3 separate instances of Ranorex, or you can drop each one under a rooted folder that has a slightly different path so Ranorex won't put the new ones there. All you really want is a way to see the differences in path generation.

For example, I would do this:
1. Repo after first object:

Code: Select all

WebSite_STORAGE -> /dom[@domain='www.mydom.com']/body/parent::dom
WebSite -> /dom[@domain='www.mydom.com']
   ButtonOK -> //button[@text='OK']
Just move ButtonOK up to the STORAGE dom, and rename it to "ButtonOK_StepCostReduce" or whatever method you selected. Just do this for each one. They should all still be reachable, but you can get each one this way.

Note: You might need to adjust this abit to get it to work the way I was intending. :D

Re: Question on StepCostReduce

Posted: Mon Jul 28, 2014 4:51 pm
by Support Team
Hi Brent,

You are right there is unfortunately no information about the build paths in our UserGuide. I will forward this request!
But you can find some information in our online API: PathBuildMode Enumeration.
PathBuildModes:
--Simple: No optimization is performed. Path predicates contain valid, appropriate and existing attribute values or indexes if no attributes can be used.
--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.
--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.

Regards,
Markus