Page 1 of 1

How to upgrade sources from 5.3.3 to 5.4 Java SWT

Posted: Tue Jul 21, 2015 11:26 am
by nico
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?

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

Posted: Wed Jul 22, 2015 7:45 am
by odklizec
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! ;)

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

Posted: Wed Jul 22, 2015 1:19 pm
by Support Team
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
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

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

Posted: Thu Jul 23, 2015 6:57 am
by nico
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).