Reusing repository items when recording / Path Weights

Technology specific object identification, supported applications, web technologies, and 3rd party controls.
ChrisSA
Posts: 9
Joined: Tue Jul 17, 2012 2:41 pm

Reusing repository items when recording / Path Weights

Post by ChrisSA » Wed Nov 07, 2012 5:08 pm

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
Repository Item.png (35.13 KiB) Viewed 1489 times
Whenever I attempt to record, clicking on the item in the software adds another repository item:
Recording Item.png
Recording Item.png (33.96 KiB) Viewed 1489 times
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

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

Re: Reusing repository items when recording / Path Weights

Post by Support Team » Thu Nov 08, 2012 4:14 pm

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
ModifyPathWeights.PNG (38.38 KiB) Viewed 1476 times
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)
.
Image

ChrisSA
Posts: 9
Joined: Tue Jul 17, 2012 2:41 pm

Re: Reusing repository items when recording / Path Weights

Post by ChrisSA » Thu Nov 08, 2012 6:29 pm

Thanks :) will try it out and let you know how it goes.
Ranorex Version: 4.0.0.20817

ChrisSA
Posts: 9
Joined: Tue Jul 17, 2012 2:41 pm

Re: Reusing repository items when recording / Path Weights

Post by ChrisSA » Tue Nov 13, 2012 3:39 pm

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.
Ranorex Version: 4.0.0.20817

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

Re: Reusing repository items when recording / Path Weights

Post by Support Team » Tue Nov 13, 2012 6:20 pm

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)
.
Image