Ranorex Studio supports out-of-the-box test automation of Qt applications.
Supported Qt versions:
- Qt Widgets: Qt version 4.5.3 or higher
- Qt Quick: Qt version 5.0.2 or higher
- Qt WebKit: Qt version 4.6.4 or higher
Only dynamically linked Qt applications are supported.
There is no need for manual instrumentation, Ranorex Studio will do it automatically.
Mobile Qt apps are not supported.
Reverting to MSAA/Qt Accessibility recognition
If you don’t want to use the default Ranorex Studio Qt object recognition, you can revert to MSAA (Microsoft Active Accessibility) and Qt Accessibility recognition.
To do so:
-
In Ranorex Studio, go to Settings > Plugins > Qt.
-
Set Use Qt legacy automation mode to True.
Loading the accessibility plugin into your Qt application
You also need to ensure your Qt application supports MSAA, or Ranorex Studio won’t be able to identify UI elements in it. To do so, you need to load the Qt accessibility plugin in the Qt application under test and ship it with it. The accessibility plugin is included in the Qt SDK.
-
Go to the installation folder of the Qt SDK and locate the folder named accessible. If you don’t have access to the Qt SDK, contact the developer of your application and ask them to send you the accessible folder.
-
Copy the accessible folder and all its contents to the plugins folder in your application’s directory (e.g. Program FilesYourApplicationplugins).
-
In the root directory of your application (e.g. Program FilesYourApplication), create a new file called qt.conf and insert the following code. If the file already exists, simply add the following code to it.
[Paths]
Plugins = plugins
This ensures Ranorex Studio to identify UI elements correctly, as shown in the two screenshots below: