Image-based tests may fail when the visual appearance of the application or the test environment changes. If you encounter errors when recording or replaying image-based actions, ensure that asynchronous dispatching of mouse and keyboard events is enabled.
General fixes
Differences in scaling, resolution, theme, fonts, or dynamic screen content can affect how reliably Ranorex finds an image during playback. This article describes common symptoms, explains the most likely causes, and provides practical fixes to improve the stability of image-based recognition.
Symptoms
- Image not found on playback
- Click/type happens in the wrong place
- Works on one machine but fails on another
Causes and fixes
| Causes | Fixes |
| DPI/scaling/resolution differences |
|
| Theme/color/font changes |
|
| Dynamic UI |
|
When to switch back to UI object recognition
If the element can be identified as a UI object, object-based recognition is usually more robust in the long term.
Asynchronous dispatching is disabled
Image-based automation may produce errors when Use asynchronous dispatching of mouse and keyboard events is disabled.
To enable this setting:
- In Ranorex Studio, open Settings.
- Select Advanced.
- Enable Use asynchronous dispatching of mouse and keyboard events.
- Select OK.
- Record or run the affected image-based action again.
When enabled, mouse and keyboard events are forwarded to the application after Ranorex finishes processing them during recording. See Advanced Settings and Configurations.