Spy not displaying absolute path

Ask general questions here.
martinsw
Posts: 72
Joined: Fri Dec 09, 2011 2:48 pm

Spy not displaying absolute path

Post by martinsw » Mon Jun 18, 2012 4:01 pm

Hi,

I've noticed recently that Ranorex spy is not displaying the absolute xpath when I track elements on the page. It is shortening the path by using "//".

E.g. rather than displaying the path

"dom/body/form/div/thead/div/span[@innertext 'some text']

it now just displaying

dom//span[@innertext 'some text']

Have I unintentionally changed a setting somewhere or was spy changed to track elements this way when Ranorex 3.3 was released? Is there not a risk of Ranorex taking longer to find elements on the page if they are not tracked using their absolute paths? I've attached another example in the form of a snapshot.

Thanks,

Martin
You do not have the required permissions to view the files attached to this post.

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: Spy not displaying absolute path

Post by Support Team » Tue Jun 19, 2012 2:30 pm

Hi,

with Ranorex v3.3 "unique ids' for web testing have been added to the RanoreXPath generation.
Therefore the "#" operator is used.
As you can see in your snapshot file the div with the unique id "content" can be identified using its id:
/dom[@domain='tasking.skillweb.co.uk']//div[#'Content']/
This will speed up object recognition as well as reduces complexity of RanoreXPaths.

Regards,
Tobias
Ranorex Team

martinsw
Posts: 72
Joined: Fri Dec 09, 2011 2:48 pm

Re: Spy not displaying absolute path

Post by martinsw » Wed Jun 20, 2012 9:39 am

Thanks Tobias

martinsw
Posts: 72
Joined: Fri Dec 09, 2011 2:48 pm

Re: Spy not displaying absolute path

Post by martinsw » Wed Jun 20, 2012 11:37 am

Hi again,

I use logical folders in my repository to group related items and to break long Ranorex Paths down into smaller, more readable pieces. This new way that spy now identifies elements is not consistent with the current logical structure I have. Would you recommend me going back and "re-tracking" all the elements in my repositiry using the new tracking method that spy now uses, storing the new paths and deleting the old ones? If yes, what would be the quickest way of doing this as I have about 300 repo items? Would there be an obvious performance benefit? I would only undertake this work if there were no plans in the immediate future for Ranorex to again change the way that web elements are tracked in such a way that would require another repository rework. Can you advise on this also please?

Many thanks,

Martin

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: Spy not displaying absolute path

Post by Support Team » Thu Jun 21, 2012 2:15 pm

Hi,

basically we recommend to use the new way of identification (using unique ids) as there should be a performance speed up with doing so.
With Ranorex 3.3.1 there will be an option in general setting which allows you to disable this new feature.
Doing so will allow tracking elements the same way it was before 3.3 has been released.
Bur, of course, you can mix old and new way of identification, because the old way should always work too.

If you are going to use the unique id for all your repo items, as I can see there is no quicker way than re-track the items again.

Regards,
Tobias
Ranorex Team

martinsw
Posts: 72
Joined: Fri Dec 09, 2011 2:48 pm

Re: Spy not displaying absolute path

Post by martinsw » Thu Jun 21, 2012 4:45 pm

Thanks Tobias. I am glad that this new way that spy identifies elements will be configurable in the next release.