New Qt vs. Qt Legacy mode

Ranorex Spy, Recorder, and Studio.
MikeV
Posts: 37
Joined: Wed Apr 04, 2012 6:01 pm

New Qt vs. Qt Legacy mode

Post by MikeV » Fri Dec 19, 2014 9:31 pm

Ranorex Studio 5.2.1. We are using the Qt plugin.

In Global Settings, there is an option "Use QT legacy automation mode", True or False. When this is set to False, some of our Qt elements are identified in more detail by Ranorex Spy, but others that used to show more detail are no longer showing that detail.

Many of our tests that try to find Qt elements are now failing when the flag is set to False. And we want to take advantage of the better Qt identification of some elements when the flag is set to False. But we can't have a situation where hundreds of tests are failing when the flag is set to False.

Is there a way to programatically set this flag, so we can change it from True to False, or vice versa?

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: New Qt vs. Qt Legacy mode

Post by Support Team » Mon Dec 22, 2014 9:35 am

Hello MikeV,

you can en/dis -able the QT legacy mode using following code snippet:

Code: Select all

Configuration.Current["plugins.qt.legacymode"] = true/false;
Please note that complications can arise if you are using folder caching.

Hope this information helps.

Regards,
Robert
.
Image

MikeV
Posts: 37
Joined: Wed Apr 04, 2012 6:01 pm

Re: New Qt vs. Qt Legacy mode

Post by MikeV » Wed Dec 24, 2014 11:37 pm

Robert,

I will try your suggestion when I get back into the office, beginning of January.

Thanks!

MikeV
Posts: 37
Joined: Wed Apr 04, 2012 6:01 pm

Re: New Qt vs. Qt Legacy mode

Post by MikeV » Mon Jan 05, 2015 11:19 pm

Robert,

The suggested code seems to be working well for us. We are using VB, so the format is to set the flag to True:

Ranorex.Core.Configuration.Current("plugins.qt.legacymode") = True

right before the xpath identification we want to work the old way, and set it back to False immediately afterwards.

Thank you!

MikeV
Posts: 37
Joined: Wed Apr 04, 2012 6:01 pm

Re: New Qt vs. Qt Legacy mode

Post by MikeV » Thu Jul 23, 2015 6:08 pm

Upgrading to Ranorex 5.4 broke our build wherever we were using this:

Ranorex.Core.Configuration.Current("plugins.qt.legacymode") = True (or False)

So something in Ranorex obviously changed, and we need to know how to change our code to handle it. I have simply commented out those lines for the time being, so we can get our solution to build. However, that means that approximately 200 of our tests are again failing.

If there is an alternate method of changing the Qt Legacy flag programmatically, please let us know what that is.

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

Re: App get crashed while tap on element in iOS Instrumented app

Post by odklizec » Thu Jul 23, 2015 8:22 pm

Hi,

I guess your problem with 5.4 is related to this breaking change, mentioned in 5.4 release notes...
Some Ranorex classes in the Ranorex.Core assembly, which were public, but not documented and not intended for public use,were moved to Library DLLs -> if you use such internal APIs, you have to add references to the Ranorex.Libs.* assemblies in order to build your Ranorex projects. Note though, that some of these APIs are marked as obsolete and will be removed in future versions of Ranorex
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: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: New Qt vs. Qt Legacy mode

Post by Support Team » Thu Jul 23, 2015 9:52 pm

MikeV wrote:So something in Ranorex obviously changed, and we need to know how to change our code to handle it.
As odklizec already supposed, the CaseInsensitiveString type was moved, because it is intended for internal use only. You can still add a reference to the Ranorex.Libs.Util.dll to use it.
We are going to add an overload of that Configuration class property taking a string so that adding a reference to that DLL is no longer necessary.

Regards,
Alex
Ranorex Team
.
Image

MikeV
Posts: 37
Joined: Wed Apr 04, 2012 6:01 pm

Re: New Qt vs. Qt Legacy mode

Post by MikeV » Mon Jul 27, 2015 5:51 pm

Thank you for your comments with this valuable information! I have been busy with lots of manual testing on a new product lately, so I have not had time to implement that change in our Ranorex code yet. When I have time, I will report how it goes.