Page 1 of 1

Reusing repository items when recording / Path Weights

Posted: Wed Nov 07, 2012 5:08 pm
by ChrisSA
Hi All,

I'm currently trying to record some scripts during a trial to demonstrate Ranorex's capabilities with our software. Unfortunately I am hitting a problem where by when I record scripts it does not use my existing repository items (set-up before recording). An example of this is below:

In my Repository I have a Folder Structure Setup up:
Repository Item.png
Whenever I attempt to record, clicking on the item in the software adds another repository item:
Recording Item.png
After finishing, further investigation shows that they are actually the same items (but different element settings, controlid vs windowstext/accessible text.


Q1: Is there any way I can force / get the recording to recognise the element already exists. I was thinking could perhaps change some of the Path Weightings but unsure as to whether this will adversely affect recording of non-predefined repository items.

Q2: Is there any way I can merge / multiple replace the newly added recording item with the Repository item, currently I have to delete then manually select the rows that no longer have an item found and replace each one. If I have used/taken screenshots I have to re-capture all the screenshots using the Repository Item area too - cannot move them.

One of the reasons I was trying to use names is that it seems to work well with the BCG menus, the id's sometimes change on these can cause test failure whereas direct names find the item well.

Thanks in advance for your time.

Chris

Re: Reusing repository items when recording / Path Weights

Posted: Thu Nov 08, 2012 4:14 pm
by Support Team
Hello,

In order to solve your issue you need to create a new rule in 'Path Weight'.
This setting will change the behavior how elements of your application are identified.

Please add a new rule as shown in the screenshot below:
ModifyPathWeights.PNG
Info:
Please change the value of attribute in accessiblename in contrast to the screenshot. The Set Weight is the priority indicator for this rule. If the Weight is less than 100 the attribute will not be used at all. In order to use this new rule you need to restart Ranorex Spy.

The usage of a new rule might have influence to the recognition of other elements. You should add a condition in this case. Please try it at first without a condition.

It is not possible to merge repository items. Unfortunately, there is no easy way to replace repository items in your recording. You would need to modify a XML file. Please let me know if you want to know how to do this.

Regards,
Markus (T)

Re: Reusing repository items when recording / Path Weights

Posted: Thu Nov 08, 2012 6:29 pm
by ChrisSA
Thanks :) will try it out and let you know how it goes.

Re: Reusing repository items when recording / Path Weights

Posted: Tue Nov 13, 2012 3:39 pm
by ChrisSA
Back looking at it again today, Unfortunately in my Ranorex Spy setting under General > Edit Path Weights adding a new rule does not give me an option for 'Dynamic' as the Capability.

I have tried using accessible as the Capability value but still see the same issue.

Also tried setting the weight of the default ControlNet11 Classnames to 0 but no effect.

Re: Reusing repository items when recording / Path Weights

Posted: Tue Nov 13, 2012 6:20 pm
by Support Team
Hello,

Please try the following steps to solve your issue:

Open 'Ranorex Spy' and select an element that has a dynamic capability (e.g. your DesignView).
Click on 'Edit Path Weights' and create your new rule.
Set Weight to 100 at least.

Regards,
Markus (T)