how to configure spy to get objects using @page

Ask general questions here.
magarwal19
Posts: 18
Joined: Thu Mar 07, 2019 2:04 pm

how to configure spy to get objects using @page

Post by magarwal19 » Mon Sep 16, 2019 11:34 am

Hi Team,

We are working on automating a web based application and while doing so, one of my team mate is getting xpaths while spying using [@page='****'], while others are not getting such xpath while spying same object and same version of Ranorex.

Can you let me know if there is some setting which we need to change, so that the object spy is done with /dom[@caption='****' and @page='***']

Currently i am only getting it as /dom[@caption='****']

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

Re: how to configure spy to get objects using @page

Post by odklizec » Mon Sep 16, 2019 11:48 am

Hi,

To make Ranorex Spy to construct xpath with different attribute, you need to increase xpath weight of given attribute(s). To learn how to change xpath weight, read below blog post and user guide chapter:
https://www.ranorex.com/blog/automated- ... namic-ids/
https://www.ranorex.com/help/latest/ran ... abilities/

In your case, you must create new rule and increase 'Page' attribute weight to 150 or higher...
page_weight.png
page_weight.png (52.5 KiB) Viewed 216 times
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

magarwal19
Posts: 18
Joined: Thu Mar 07, 2019 2:04 pm

Re: how to configure spy to get objects using @page

Post by magarwal19 » Mon Sep 16, 2019 12:26 pm

Hi odklizec ,

Thank you for your help. I am able to update the weights and modify the xpaths accordingly