i cannot re-use my test cases

Experiences, small talk, and other automation gossip.
lakiphala
Posts: 3
Joined: Thu Jan 21, 2016 1:43 pm

i cannot re-use my test cases

Post by lakiphala » Tue Feb 09, 2016 3:14 pm

i am a beginner in ranorex but not automation, i am testing a web application and every-time i open the webpage the object id keeps on changing so ranorex cannot identify it because the id during the time of recording is different from the id when playing the recorded test case.

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

Re: i cannot re-use my test cases

Post by odklizec » Wed Feb 10, 2016 11:19 am

Hi lakiphala and welcome here,

There is a nice Ranorex blog post regarding your problem...
http://www.ranorex.com/blog/automated-t ... ynamic-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

lakiphala
Posts: 3
Joined: Thu Jan 21, 2016 1:43 pm

Re: i cannot re-use my test cases

Post by lakiphala » Wed Feb 10, 2016 3:00 pm

Hi odklizec thanks for the link.i tried that but not sure if the weight changed.
Attachments
ID.JPG
ID.JPG (60.18 KiB) Viewed 708 times
get.JPG
get.JPG (102.27 KiB) Viewed 709 times

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

Re: i cannot re-use my test cases

Post by odklizec » Wed Feb 10, 2016 3:21 pm

Hi,

To see if the xpath weight rule is saved correctly, go to Spy and try to track the element again. It should now prefer atag over div. Which means you also need to re-record your existing repository elements with new weight. I'm afraid, changed weight will not update existing repo items.
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