Page 1 of 1

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

Posted: Sun Aug 18, 2019 10:44 am
by danielaSiemplify
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!

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

Posted: Mon Aug 19, 2019 10:36 am
by odklizec
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/