Use image-based testing when the app uses custom-drawn controls, and object recognition is limited, and when you need to validate a visual element that is not reliably exposed as a UI object.
Among the best practices for Image-based testing:
- Use image-based steps only for the smallest necessary part of the workflow.
- Prefer stable visual targets (icons/controls that don’t change by theme, DPI, or language).
- Keep image boundaries tight: include the minimum unique pixels needed.
- Avoid dynamic regions (animated content, timestamps, rotating banners).