View Full Version : Windows Setup application built with Qt has no UI Control information

20th July 2015, 19:50

I have been tasked with writing automated test cases for a Windows setup application built using Qt. The setup.exe launches several prereq.msi and component.msi installers. When looking at setup.exe under Visual UI Automation Verifier, there is zero information for controls.

My developers do not know how or where to insert information for UI controls... either ID's or text.

Is it possible for my developers to add UI control information for a Windows Setup application?


20th July 2015, 20:37
Qt does not use native handles for widgets unless it has to, e.g. for top level windows or, I think, when winId() is being called.
I.e. all controls are "drawings" in the window's buffer.

Qt does, however, allow easy access to its object tree from within the application itself, e.g. objects can get a name attaches (setObjectName) and this can be used to search for them (e.g. QObject::findChildren())

This can either be built into the application or injected externally, e.g. see the GammaRay debugging tool: http://www.kdab.com/gammaray/

UI Testing tools can do the same, even listen to events happening inside the application, e.g. Squish http://www.froglogic.com/squish/gui-testing/

A somewhat less extensive but potentially viable approach is to attach accessibility information to controls and using the platform's accessibility system to interact with them.