Track elements by custom attributes via the 'Edit path weights'

Technology specific object identification, supported applications, web technologies, and 3rd party controls.
danielaSiemplify
Posts: 1
Joined: Sun Aug 18, 2019 10:35 am

Track elements by custom attributes via the 'Edit path weights'

Post by danielaSiemplify » Sun Aug 18, 2019 10:44 am

Hello,
I'm working on Ranorex 9.1.1.0.
The developers in our company add a dedicated attribute for the automation tests called "tnautomationid" and "tnautomationref".
When I'm adding these attributes manually to the spy it works, but I would like to define this attribute to by the default when I'm using the Track.
Is it possible?

Thanks!

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 7470
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Track elements by custom attributes via the 'Edit path weights'

Post by odklizec » Mon Aug 19, 2019 10:36 am

Hi,

Sure, it's possible to increase the priority of chosen attribute for recording and track tool. What you need to do is to create a new xpath weight rule and then increase weight of given attribute. Check my old, but still valid, post about creating new xpath weight rule here:
default-property-to-use-when-generating ... tml#p17775
And check also this blog post, with further details about weight rules...
https://www.ranorex.com/blog/automated- ... namic-ids/
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration