Question on StepCostReduce

Ask general questions here.
brentmclauclan
Certified Professional
Certified Professional
Posts: 23
Joined: Wed Jun 25, 2014 11:59 am

Question on StepCostReduce

Post by brentmclauclan » Fri Jul 25, 2014 3:24 pm

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

krstcs
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

Re: Question on StepCostReduce

Post by krstcs » Fri Jul 25, 2014 4:17 pm

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
Shortcuts usually aren't...

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: Question on StepCostReduce

Post by Support Team » Mon Jul 28, 2014 4:51 pm

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