Object Identification in Qt 5.15.0 seems broken

Technology specific object identification, supported applications, web technologies, and 3rd party controls.
Martin Hanysz
Posts: 2
Joined: Thu Jul 09, 2020 1:45 pm

Object Identification in Qt 5.15.0 seems broken

Post by Martin Hanysz » Thu Jul 09, 2020 2:12 pm

Hello,

My company develops a windows application based on Qt. We recently updated from Qt 5.12.7 to the latest Qt release 5.15.0 and ranorex's object identification seems broken since then.

All objects are missing the Qt specific attributes and some objects are not detected at all. In addition, the objects that are detected, appear twice in the spy, once with the attributes for General, Layout and Accessible and once with the attributes for General, Layout, UIAutomation and UIAutomationValue.

I attached two ranorex snapshots of the same dialog of the application. Apart from the Qt update, the dialog did not change. It has some text and only one button. With Qt 5.15.0, the text isn't detected at all and the button is detected twice, as described above. With Qt 5.12.7, all Qt elements that are used to divide the dialog into different sections are also detected. The text on the page shows up as two separate elements, one for each paragraph and the button also only shows up once.
Ranorex9.3.2-Bdrive89.4-WelcomeDialog-correct.rxsnp
(107.15 KiB) Downloaded 11 times
This behavior can also be reproduced using the Qt sample app from this thread https://www.ranorex.com/forum/spy-does- ... 15745.html. Once the Qt dlls are replaced with the ones from Qt 5.15.0, the described behavior can be observed.

1) Do you know if and how we can get the old object identification back?
2) Do you have experience with the combination of ranorex and Qt 5.15.0? Maybe there are settings we need to change in ranorex or our application that we overlooked?

Kind regards,
Martin Hanysz

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

Re: Object Identification in Qt 5.15.0 seems broken

Post by odklizec » Fri Jul 10, 2020 12:41 pm

Hi,

It looks like a problem with Ranorex implementation of QT? It's most probably not optimized for Qt 5.15.0 yet? I would suggest to create a support ticket here:
https://www.ranorex.com/support-query/
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

rnotman
Posts: 2
Joined: Sun Nov 12, 2017 7:53 pm

Re: Object Identification in Qt 5.15.0 seems broken

Post by rnotman » Tue Aug 18, 2020 6:20 pm

I am having exactly the same problem since the introduction of Qt 5.15. Whereas;

//tree[@name='sellPrices']/treeitem[@text='2']/cell[@columnindex='1' and @rowindex='2']

Works for me to access a cell in a treeview, it fails after the introduction of Qt 5.15. Spy doesn't even present the rows/columns as properties.

I'll lodge a ticket.

tim.oesterreich
Posts: 1
Joined: Thu Aug 20, 2020 8:58 am

Re: Object Identification in Qt 5.15.0 seems broken

Post by tim.oesterreich » Thu Aug 20, 2020 9:03 am

I'm a colleague of Martin, and we were able to identify the issue.
Qt slightly changed the naming of their Window class names in Windows. While a window's class name was "Qt5QWindow" before, it is now "Qt5150QWindow", which can probably not be detected correctly by Ranorex.
We were able to work around this issue by reverting this commit: https://github.com/qt/qtbase/commit/127 ... a2f6621e02 in our custom Qt version for now.

There are also some more information in this Qt bug ticket: https://bugreports.qt.io/browse/QTBUG-85564

Please fix this soon.
@rnotman, maybe you could attach this information to your ticket.

Martin Hanysz
Posts: 2
Joined: Thu Jul 09, 2020 1:45 pm

Re: Object Identification in Qt 5.15.0 seems broken

Post by Martin Hanysz » Thu Aug 20, 2020 10:53 am

Since we did not hear back from the Ranorex support team yet, we researched what the cause of this issue is. It turns out, that Qt 5.15.0 renames its classes from e.g. Qt5Window to Qt5150Window. This seems to break the object recognition. We built a custom Qt 5.15.0 version where we removed the commit that renames the classes and the object detection seems to work again.

You can find the corresponding QT bug ticket here: https://bugreports.qt.io/browse/QTBUG-85564

Since permanently using a custom build for a major dependency like Qt is unfeasible, I'd like to ask the Ranorex team to adapt the object recognition to changing Qt class names accordingly.

rnotman
Posts: 2
Joined: Sun Nov 12, 2017 7:53 pm

Re: Object Identification in Qt 5.15.0 seems broken

Post by rnotman » Thu Aug 20, 2020 8:04 pm

Good research here, and as mentioned, we are in the same boat. The Qt commit seems to be in order to support having multiple versions of Qt running in the same process. That decision does seem to break the Ranorex detection of Qt. Perhaps more importantly, since Qt classes look they will forever more have version specific class names, this will continue to be a problem for Ranorex from one version to the next.

We hang on this also. There are particular fixes in Qt that we are depending on. Having to build Qt ourselves is possible, but not advisable or wise in the long term. Someone starting with Qt today, and trying to use Ranorex will also fail, which isn't a good thing either.

ifro
Posts: 1
Joined: Tue Sep 08, 2020 11:30 am

Re: Object Identification in Qt 5.15.0 seems broken

Post by ifro » Tue Sep 08, 2020 11:32 am

Hi!
We urgently need a solution for this issue. Currently our 500 Testcases are not working because of this Problem. We have created Supoort Tickets and nothing heard since 1 week. Is there any fix from Ranorex which is coming in the next days? How we can reach Support except support Form? Unfortunately I couldn't find a number to call.

jonatan_media
Posts: 1
Joined: Tue Sep 22, 2020 10:37 am

Re: Object Identification in Qt 5.15.0 seems broken

Post by jonatan_media » Tue Sep 22, 2020 10:40 am

Hi!

In my project, we continue to have this problem and we are not getting a response from Ranorex. Does anyone know what's the problem state with Qt 5.15?

Thanks!

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

Re: Object Identification in Qt 5.15.0 seems broken

Post by Support Team » Tue Sep 22, 2020 9:13 pm

Our developers are aware of this issue and we are actively investigating it. Currently, we do not know if and when this issue will be fixed as this depends on various factors. Nevertheless, all new features, updates, and bug fixes are documented in the release notes with every new version release of Ranorex.

Kind Regards,
Ned
.
Image