Repo item seen different in a minor version change.

Technology specific object identification, supported applications, web technologies, and 3rd party controls.
dmconsulting1
Posts: 95
Joined: Fri Nov 08, 2019 3:23 pm

Repo item seen different in a minor version change.

Post by dmconsulting1 » Tue Nov 17, 2020 12:17 am

Ranorex seeing the same UI object differently in different builds. Here is the path for one version vs the other.

Version 1.3
/form[@processname='DrillApp']
/container[@controlname='toolStripContainer1']
/container[@controlname='contentPanel']
/container[@caption='']
//form[@controlname='Pages']
/?/?
/container[@controlname='calibrationPages1']
//container[@controlname='panel2']
/container[@controlname='selectedItemBox']
/container[@controlname='SelectedItemSummaryGroupBox']
//table[@controlname='itemGridView']
/row[@accessiblename='Row 0']
/?

Version 1.4
/form[@processname='DrillApp']
/container[@controlname='toolStripContainer1']
/container[@controlname='contentPanel']
/container[@caption='']
//form[@controlname='Pages']
//container[@controlname='panel2']
/container[@controlname='selectedItemBox']
/container[@controlname='SelectedItemSummaryGroupBox']
//container[@controlname='panel1']
/?/?
/container[@controlname='pnlControle']
/table[@controlname='itemGridView']
/row[@accessiblename='Row 0']
/?

What is the best way to handle this? Thanks.

dmconsulting1
Posts: 95
Joined: Fri Nov 08, 2019 3:23 pm

Re: Repo item seen different in a minor version change.

Post by dmconsulting1 » Tue Nov 17, 2020 12:26 am

The view from Spy

Version 1.3
index0_1_3.png
index0_1_3.png (83.31 KiB) Viewed 892 times
Version 1.4
index0_1_4.png
index0_1_4.png (72.34 KiB) Viewed 892 times

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

Re: Repo item seen different in a minor version change.

Post by odklizec » Tue Nov 17, 2020 12:38 am

Hi,

Could you please upload a Ranorex snapshot (not screenshot) from both versions? Have you asked developers if they changed something in UI. Maybe even different version of UI library?
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

dmconsulting1
Posts: 95
Joined: Fri Nov 08, 2019 3:23 pm

Re: Repo item seen different in a minor version change.

Post by dmconsulting1 » Tue Nov 17, 2020 2:00 pm

Yes, it looks as if something was changed (again) without telling me about it. It looks like I have to create a second version of the repo items.

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

Re: Repo item seen different in a minor version change.

Post by odklizec » Tue Nov 17, 2020 5:29 pm

Hi,

This is quite normal situation and something you will have to live with ;) Developers will NEVER inform you about potential UI changes ;) In my opinion, all you have to do is to make the xpath a bit shorter and so less prone to changes. It's hard to tell without seeing the snapshot, but I would personally go with something like this (instead of creating another version of xpath):

Code: Select all

/form[@processname='DrillApp']/container[@controlname~'toolStripContainer']/container[@controlname='contentPanel']//form[@controlname='Pages']//container[@controlname='SelectedItemSummaryGroupBox']//table[@controlname='itemGridView']/row[@accessiblename='Row 0']
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

dmconsulting1
Posts: 95
Joined: Fri Nov 08, 2019 3:23 pm

Re: Repo item seen different in a minor version change.

Post by dmconsulting1 » Tue Nov 17, 2020 6:07 pm

While going through it, I noticed for some reason one of the test cases used a different repo item than the rest and it worked. Still not sure why Ranorex chose to build the path the way it did, but I changed all the references to the new reference and both version now work.

Old Version:
/form[@processname='DrillApp']
/container[@controlname='toolStripContainer1']
/container[@controlname='contentPanel']
/container[@caption='']
//form[@controlname='Pages']
//container[@controlname='panel2']
/container[@controlname='selectedItemBox']
/container[@controlname='SelectedItemSummaryGroupBox']
//container[@controlname='panel1']
/?/?
/container[@controlname='pnlControle']
/table[@controlname='itemGridView']
/row[@accessiblename='Row 1']

New Version:
/form[@processname='DrillApp']
/container[@controlname='toolStripContainer1']
/container[@controlname='contentPanel']
/container[@caption='']
//form[@controlname='Pages']
/?/?
/container[@controlname='calibrationPages1']
//container[@controlname='panel2']
/container[@controlname='selectedItemBox']
/container[@controlname='SelectedItemSummaryGroupBox']
//table[@controlname='itemGridView']
/row[@accessiblename='Row 1']


You can see they are close, just one chose to use wildcards in a different location and that makes it work.

Not sure why, but it does. :lol: