Disable RanorexPath shortening

Best practices, code snippets for common functionality, examples, and guidelines.
mdgairaud
Posts: 87
Joined: Sun Aug 05, 2012 11:59 am
Location: Bilbao, Spain

Disable RanorexPath shortening

Post by mdgairaud » Tue Oct 15, 2013 12:24 pm

Hi all,

One thing that the spy do is shortening the RxPath by default, it causes that some elements with the same name may crashes the test execution (at least in my case) :roll: .

To avoid this shortening just open the Spy and go to Settings, then check out the option "Enable search by unique ID (if available)". (see image attached) Now it always uses the full lenght path.

Thats all :D
ranorexSpy.png
ranorexSpy.png (19.2 KiB) Viewed 1134 times
regards,
Mateo.

[edit: added 2 images showing shortening]

with option checked:
with.png
with.png (16 KiB) Viewed 1131 times
with option unchecked:
without.png
without.png (24.51 KiB) Viewed 1131 times

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

Re: Disable RanorexPath shortening

Post by Support Team » Wed Oct 23, 2013 12:25 pm

Hi Mateo,

Thanks for sharing your experiences :)!

I just want to add that Ranorex not just shortens the RxPath when the search by unique ID algorithm is enabled, it is also a much faster way to find the web elements. In order to find the elements by the IDs it is necessary that these "unique IDs" are really unique. So it is perfectly right to disable it when this is not the case :).

Regards,
Markus
.
Image