How to upgrade sources from 5.3.3 to 5.4 Java SWT

Technology specific object identification, supported applications, web technologies, and 3rd party controls.
nico
Posts: 24
Joined: Tue Nov 04, 2014 3:13 pm

How to upgrade sources from 5.3.3 to 5.4 Java SWT

Post by nico » Tue Jul 21, 2015 11:26 am

We have a big test suite filled with a large object repository full with Java SWT objects.

I upgraded my Ranorex Suite from 5.3.3 to 5.4 and I noticed I have to make a lot of changes to my object repository to make the Java SWT objects identifiable again.

Is there a way to do this automatically or do I need to do it manually?

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

Re: How to upgrade sources from 5.3.3 to 5.4 Java SWT

Post by odklizec » Wed Jul 22, 2015 7:45 am

Hi,

I don't think there is an "automatic" way to update your repository. But you may speed things up by direct editing of rxrep file in a text editor? So if some of the required changes are repeating, you can use search and replace over the whole file?

Basically, the rxrep is just a xml file. Once you finish editing, rebuild solution and associated repository cs file should get updated as well. Don't forget to backup the rxrep before you start with editing! ;)
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
Support Team
Site Admin
Site Admin
Posts: 11710
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: How to upgrade sources from 5.3.3 to 5.4 Java SWT

Post by Support Team » Wed Jul 22, 2015 1:19 pm

Hi Nico and odklizec,

We added native support for Java SWT elements with 5.4 and this also results in the following breaking change:
"As the native Java SWT support is switched on by default, existing RanoreXPaths formerly created on Java SWT applications no longer work -> it is highly recommended to use the new native support for Java SWT which should highly increase object recognition stability. As a short-term alternative you can enable the old legacy behavior by enabling the "Use Java SWT legacy automation mode" plugin setting"

When you still want to run your tests which use the old RxPaths you just need to change the
setting "Use Java SWT legacy automation mode" to True, as shown below:
SWTLegacySetting.png
SWTLegacySetting.png (36.33 KiB) Viewed 831 times
This will allow you to run your old tests, but disables the new native SWT support as well.

Do you have a huge project/repository? Could you maybe send your Ranorex solution to [email protected]?

Regards,
Markus
.
Image

nico
Posts: 24
Joined: Tue Nov 04, 2014 3:13 pm

Re: How to upgrade sources from 5.3.3 to 5.4 Java SWT

Post by nico » Thu Jul 23, 2015 6:57 am

Thanks Marcus and odklizec!

I will try to update the client on Friday and I will gladly share some of the solutions (we actually divided the full test set in several solutions, since SVN wasn't set up in the beginning).