In GUI test automation, there are different approaches to identifying UI elements. Ranorex Studio primarily uses an object-oriented approach, where it identifies UI elements based on their underlying UI technology. When this approach can’t reliably identify an element, you can switch to image-based testing, which interacts with UI elements based on pixel recognition.
In this article, you’ll learn:
- When image-based testing is a good fit (and when it isn’t)
- How to enable image-based recording in the Recorder
- A practical example showing how false positives can happen with object-oriented identification—and why image-based actions can help
Enable image-based recording
The best way to use image-based testing in Ranorex Studio is through the Recorder. There, you can enable and disable image-based testing while you’re recording. This way, you can combine object-oriented and image-based approaches in a single recording if required.
To enable image-based recording:
- Start recording as usual.
- Click the Image-based recording switch to turn it on.
To enable hotkeys:
- While recording, enable hotkeys.
- Press
Ito toggle image-based recording.
Why image-based testing?
Image-based testing is useful when the object-oriented approach can’t produce satisfactory results.