Use this article if Ranorex Spy cannot identify individual controls in a desktop application or recognizes the entire application as a single graphic element.
Symptoms
You may experience one or more of the following issues:
- Ranorex Spy recognizes the application window but does not detect individual controls.
- Buttons, text fields, lists, or other UI elements cannot be tracked individually.
- Ranorex Spy displays the application or part of the application as a single graphic element.
- Object recognition works only with image-based recognition.
- Recording actions against individual controls is not possible.
Cause
Ranorex relies on accessibility technologies provided by the application to identify and interact with UI elements.
For Windows desktop applications, these technologies include:
- Microsoft UI Automation (UIA)
- Microsoft Active Accessibility (MSAA/IAccessible)
- Native Windows controls
If the application does not expose sufficient accessibility information, Ranorex cannot identify the individual controls.
This can occur when an application:
- Uses custom-drawn controls.
- Uses a UI framework that does not expose accessibility information by default.
- Does not implement UIA or MSAA providers.
- Renders the interface as a single graphical surface instead of individual Windows controls.
Applications created with frameworks such as WinDev may require additional accessibility configuration before individual elements can be recognized.
Diagnose the issue
Check the application with Ranorex Spy:
- Open Ranorex Spy.
- Track the application window.
- Move the tracking indicator over different controls.
If Ranorex Spy highlights the entire application or a large area instead of individual controls, the application may not expose sufficient accessibility information.
Check accessibility information
Use a Microsoft accessibility inspection tool, such as Accessibility Insights for Windows, to check whether the application exposes individual UI elements.
If the accessibility tool also cannot identify individual controls, the limitation originates in the application or UI framework rather than in Ranorex object recognition.
Resolution
The available resolution depends on how the application is implemented.
Enable accessibility support
If the application framework provides an accessibility option, enable it.
For example, applications created with WinDev may provide accessible controls that expose additional information to accessibility technologies.
Refer to the documentation of the framework used by the application for information about enabling UI accessibility.
Use standard Windows controls
If you control the application's development, use standard Windows controls where possible.
Standard controls generally provide accessibility information that Ranorex can use for object recognition.
Implement an accessibility provider
For custom-drawn controls, the application developer can implement a UI Automation or MSAA accessibility provider.
This allows automation tools such as Ranorex to retrieve information about individual UI elements.
Use image-based automation
If you can't add accessibility support to the application, use image-based automation as an alternative.
Image-based automation identifies UI elements by their visual appearance instead of their accessibility properties.