RanoreXPath changed between version causing hundreds of test to fail

Bug reports.
Evgeni
Posts: 3
Joined: Tue Mar 08, 2022 1:25 pm

RanoreXPath changed between version causing hundreds of test to fail

Post by Evgeni » Tue Mar 08, 2022 1:38 pm

Hello all,

Currently, we are using Ranorex version 9.5.
After upgrading to version 10.1.6, all our RanoreXPath were not recognizable causing hundreds of test to fail.
for example:

9.5: /form[@controlname='ShellEnv']/container[@controlname='_pnlLeft']//tabpagelist[@automationid='RootTab']/tabpage[@automationid='BrowseTab']/container[@automationid='BrowseViewTab']/?/?/text[@caption='']

10.1.6: /form[@controlname='ShellEnv']/container[@controlname='_pnlLeft']/container[@controlname='_pnlDetails']//tabpagelist[@automationid='RootTab']/?/?/text[@caption='']

I've tried "playing" with the setting->advanced->Expert settings... but no luck there....
please assist

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

Re: RanoreXPath changed between version causing hundreds of test to fail

Post by odklizec » Wed Mar 09, 2022 10:09 am

Hi,

Well, going from 9.5 to 10.1.6 is a huge step. There were a lot of changes introduced between these versions, so now it's hard to tell if it's bug or simply a breaking change, due to some improvements? Things sometimes changes ;) Could you please share the snapshot of the AUT taken with 9.5 and 10.1.6? But in my opinion, you will simply have to adapt the xpaths in your repo? The best you can do is to use Root folders in repo wherever possible and not to use the same piece of xpath in each separate repo item. So then the changes of xpaths are pretty easy.
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

Evgeni
Posts: 3
Joined: Tue Mar 08, 2022 1:25 pm

Re: RanoreXPath changed between version causing hundreds of test to fail

Post by Evgeni » Wed Mar 09, 2022 10:58 am

No other option other that update each of our 600 scripts one by one?
we also tested 10.0 and there were no problem there but I see it deprecated

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

Re: RanoreXPath changed between version causing hundreds of test to fail

Post by odklizec » Wed Mar 09, 2022 11:29 am

Why updating 600 scripts? Well, if you are using xpaths directly in code, instead of using repository (proper way), then yes, you may most probably have to update all files where the problematic xpaths are used. This is exactly why you should use repository!
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

Evgeni
Posts: 3
Joined: Tue Mar 08, 2022 1:25 pm

Re: RanoreXPath changed between version causing hundreds of test to fail

Post by Evgeni » Wed Mar 09, 2022 12:41 pm

We use repository, but under that we have at least 500 Xpaths....

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

Re: RanoreXPath changed between version causing hundreds of test to fail

Post by odklizec » Wed Mar 09, 2022 12:44 pm

I see, I was just confused by your comment about "600 scripts". Well, as I mentioned, maybe it's a good time to reorganize your repository with extensive usage of root folders? This should help with any future changes, where you may need to change just the root folder path.
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

exm1110b
Posts: 6
Joined: Thu Jun 11, 2020 9:24 am

Re: RanoreXPath changed between version causing hundreds of test to fail

Post by exm1110b » Thu Mar 10, 2022 3:58 pm

hi.. i'm a software developer from the same company Evegeni works and while i'm not very familiar with ranorex i can give a more concrete example
given the following ui we would like to obtain this textbox for the test

on the left is ranorex 9.5 you'll see the hierarchy placing the text box under BrowserViewTab which is under the BrowserView
while on the right in ranorex 10 that hierarchy has suddenly changed, where both the textbox and button were moved outside the browsertab and placed under root tab.


i have the xaml source code
and that is clearly wrong, as you can see the text box and button are both under their own view of type BrowserView called BrowserViewTab contained under BrowserTab , so even if BrowserViewTag was skipped , those ui elements would still be under BrowserTab
xaml.png
so we'd like to know why this change?
how can root folder assist in such a case?

if those types of changes happen often it would make upgrading extremely difficult and unpredictable.
i tried going through the release notes, but i couldn't something that would hint of such
You do not have the required permissions to view the files attached to this post.

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

Re: RanoreXPath changed between version causing hundreds of test to fail

Post by odklizec » Fri Mar 11, 2022 9:11 am

Hi,

Now this reminds me a similar issue we discussed a month ago or so. If your app is a WPF-based app, then it's most probably a bug introduced in 10.1.3. Honestly, I don't know when this bug will be fixed. Please try to uninstall 10.1.6 and get 10.1.2 available here:
https://www.ranorex.com/download/Ranorex-10.1.2.exe
If the problem is gone in this version, then it's most probably it.
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

exm1110b
Posts: 6
Joined: Thu Jun 11, 2020 9:24 am

Re: RanoreXPath changed between version causing hundreds of test to fail

Post by exm1110b » Fri Mar 11, 2022 3:53 pm

do you happen to have a link to those discussion? details about the bug, how to reproduce? avoid etc..

jlo
Posts: 2
Joined: Mon Mar 14, 2022 12:17 pm

Re: RanoreXPath changed between version causing hundreds of test to fail

Post by jlo » Wed Mar 16, 2022 11:32 am

Hi!, we just to experienced a similar situation here, moving from 10.1.2 to .6 a lot of xpath start crashing. Is there any thread/discussion/or bug reported for the version 1.3 that you guys mentioned? Anyone knows if the version .6 is kind off unstable?

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

Re: RanoreXPath changed between version causing hundreds of test to fail

Post by odklizec » Wed Mar 16, 2022 11:38 am

Hi,

It seems it's the same issue, which emerged with 10.1.3 release and which is not fixed yet. The original discussion can be found here:
https://www.ranorex.info/after-changing ... 20893.html
Sadly, I have no news regarding the fix :(
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