Page 1 of 1

Repo item seen different in a minor version change.

Posted: Tue Nov 17, 2020 12:17 am
by dmconsulting1
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.

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

Posted: Tue Nov 17, 2020 12:26 am
by dmconsulting1
The view from Spy

Version 1.3
index0_1_3.png
Version 1.4
index0_1_4.png

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

Posted: Tue Nov 17, 2020 12:38 am
by odklizec
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?

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

Posted: Tue Nov 17, 2020 2:00 pm
by dmconsulting1
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.

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

Posted: Tue Nov 17, 2020 5:29 pm
by odklizec
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']

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

Posted: Tue Nov 17, 2020 6:07 pm
by dmconsulting1
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: