Element not found due to migration

Ask general questions here.
User avatar
Julien Diot
Posts: 21
Joined: Wed Feb 20, 2019 4:25 pm
Location: Amiens (FR)

Element not found due to migration

Post by Julien Diot » Wed Jun 12, 2019 10:09 am

Hello,

I just migrated my ranorex V5 project to ranorex V9.1 via ranorex V7, this step was mandatory for me to be able to switch to V9.

Most of my elements are no longer identified....
I must replace".//element[@controlname='CwnMedicIhmProductMed']" with this "//container[@name='CwnMedicIhmProductMed']" for example.

Is there a particular option? The problem appeared when switching to version V7.

Sincerely

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

Re: Element not found due to migration

Post by odklizec » Wed Jun 12, 2019 10:39 am

Hi,

I'm afraid, it's impossible to tell what's wrong, and what are your options, without seeing, at very least, a Ranorex snapshot (NOT screenshot) of the problematic element(s). Ideally, the snapshots should be taken both with v5 and 9.1. Without seeing internal structure of the UI and knowing the UI technology used in your app, it's impossible to suggest anything reliable.

BTW, if the only change is different attribute name (from 'controlname' to just 'name'), then you can open the rxrep file in any good text editor and simply replace all appearances of controlname to name ;) Then save the file, reopen solution in Ranorex and it should regenerate cs file. But don't forget to make a backup copy of rxrep file (ideally in source control of your choice), before making changes outside Ranorex Studio!
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

User avatar
Julien Diot
Posts: 21
Joined: Wed Feb 20, 2019 4:25 pm
Location: Amiens (FR)

Re: Element not found due to migration

Post by Julien Diot » Wed Jun 12, 2019 10:51 am

My application is developed in "Delphi XE5".
Attachments
RenorexV9.png
Windows Server 2012 R2 - Ranorex V9
RenorexV9.png (60.31 KiB) Viewed 64 times
RanorexV5.png
Windows Server 2008 R2 - Ranorex V5
RanorexV5.png (48.17 KiB) Viewed 64 times

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

Re: Element not found due to migration

Post by odklizec » Wed Jun 12, 2019 11:01 am

Thanks, but as I mentioned, screenshots are useless for UI evaluation. Please create snapshots ;)

The only thing I see from screenshots, is a major improvement in 9.1 over 5! In v 5, you were using RAWText elements, while in 9.x uses native Delphi plugin, which natively supports Delphi elements! And this plugin extracts way more information from Delphi UI than RAWTexts. So yes, there is a difference, but a very positive difference! ;) You will just have to adapt your project with new Ranorex Delphi plugin. Either this, or you can simply disable new Delphi plugin in settings (Settings >> Plugins tab) and your solution should (may) work as before? But honestly, I would rather suggest to adapt the existing solution, instead of using obsolete approach.
Last edited by odklizec on Wed Jun 12, 2019 11:08 am, edited 1 time in total.
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

User avatar
Julien Diot
Posts: 21
Joined: Wed Feb 20, 2019 4:25 pm
Location: Amiens (FR)

Re: Element not found due to migration

Post by Julien Diot » Wed Jun 12, 2019 11:02 am

Effectively , the search/replace solution can be a solution if I don't have another one ;-)

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

Re: Element not found due to migration

Post by odklizec » Wed Jun 12, 2019 11:09 am

Check my updated answer ;)
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

User avatar
Julien Diot
Posts: 21
Joined: Wed Feb 20, 2019 4:25 pm
Location: Amiens (FR)

Re: Element not found due to migration

Post by Julien Diot » Wed Jun 12, 2019 11:11 am

Excuse me, I didn't understand.)
Attachments
SnapShot_V9.rxsnp
(1.56 MiB) Downloaded 6 times
SnapShot_V5.rxsnp
(142.15 KiB) Downloaded 6 times

User avatar
Julien Diot
Posts: 21
Joined: Wed Feb 20, 2019 4:25 pm
Location: Amiens (FR)

Re: Element not found due to migration

Post by Julien Diot » Wed Jun 12, 2019 11:19 am

Thank you very much for your help.

Indeed, by disabling the Delphi plugin it is functional again.

I agree with you about using the plugin, the only problem is that it's a huge project to migrate.

It is up to my boss to make the decision ;-)

Thanks again for your help.