Ranorex Studio supports out-of-the-box test automation of Qt applications.
Supported Qt versions (only dynamically linked Qt applications are supported):
- 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
There is no need for manual instrumentation; Ranorex Studio will do it automatically.
Ranorex Studio supports interaction with applications built using Qt 6.9.1. Core functionality has been validated using multiple Qt example applications across Qt Quick and Qt Widgets, confirming that Ranorex can recognize and interact with many commonly used Qt UI controls.
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: