How to set which properties to use for the Repository

Ranorex Spy, Recorder, and Studio.
pksy
Posts: 10
Joined: Fri Dec 16, 2011 7:06 pm

How to set which properties to use for the Repository

Post by pksy » Fri Dec 30, 2011 8:41 pm

Hi,

How does the Repository know which property to use when it comes to automatically generating an xpath?

For example: I have a Form where it has a property "controlname" and "title". When I recorded one action on that form, it created a repo starting with "/form[@controlname='New File']". But when I recorded a different action, it created a repo starting with "/form[@title~'^CandidateLast,\ CandidateF']". Eventhough it's the same form, a separate repository item was created. This makes organizing the repository difficult. Is there a way to set the default property to use?

Thanks
Patrick

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

Re: How to set which properties to use for the Repository

Post by Support Team » Sat Dec 31, 2011 9:43 am

Hi,

For each element there are weights for the attributes to identify the element stored.

These weights also can be edited by the user.

Please open the Ranorex Spy and track on element. If you open the Overview Tab, you see all the attributes of the selected element listed.
One of the element is bold. This attribute is used by default by Ranorex to identify this element.

On the bottom right corner of this overview tab, there is a link "Edit Path Weights...".
Within this editor you can edit the attribute weights for the element - and therefore it is possible to change the attribute which will be used by default to identify.

Regards,
Martin
Ranorex Support Team
.
Image