On this page

Image Selection Editor

The Image Selection Editor view opens when you insert an image-based action into the test script using a new image.

The Image Selection Editor view

In the Image Selection Editor, you can view the desktop's screenshot, select an image to store for subsequent searches, and configure how Squish searches for it.

Use the scrollbars and the controls below the screenshot to adjust the view while selecting an image. Zoom the screenshot as needed with the Zoom In () and Zoom Out () buttons, or return to its original scale with Original Size ().

If needed, change the screenshot orientation with the Rotate Counter-clockwise () and Rotate Clockwise () buttons.

By default, Squish searches the entire desktop. Use Search Region to limit the search to specific windows or widgets of the AUT.

If the current screenshot does not show the required state of the application, use Refresh to capture it again immediately, or Refresh in 3 sec to capture it after a short delay. The delay gives you time to rearrange the application, for example by opening a menu before the new screenshot is taken.

Use the Classic or VisionIQ tab to choose how to select the image and configure the search.

The Classic tab lets you select an image region manually and configure the standard image search.

Drag the rectangular selection to the correct position and resize its edges to fit the element to be searched. Keep the amount of background pixels as small as possible for faster and more robust searches.

Enable Tolerant search to find images that differ from the stored image, and use Threshold to control how similar a match must be.

To include scaled versions of the stored image in the search, enable Allow different sizes and use Min and Max to define the permitted size range as a percentage of the original image size.

You can configure the default values for these settings in Test Suite Settings > Image Search under Image Search Defaults.

Image Search Defaults in Test Suite Settings

The VisionIQ tab uses a detection model to identify UI elements in the screenshot and present them as selectable regions.

Image selection using VisionIQ

Use Detection model to select the model for detecting UI elements, and Detection threshold to define the minimum confidence required for an element to be included in the detection results.

For matching, Matching model specifies the model used to compare detected elements, while Match threshold defines the minimum similarity required for a match.

Squish marks the detected elements in the screenshot, while the Labels list shows the element types identified by the model, such as button, image, icon, and text.

Select or clear individual labels to control which types of detected elements are available for selection. Click the Select All () button to select all labels, the Unselect All () button to clear all labels, or the Invert Selection () button to invert the current label selection.

When you choose a detected element in the screenshot, it becomes the current image selection. Squish also shows its location, size, confidence, and label.

Details of a detected element

The default values for Detection model, Detection threshold, Matching model, and Match threshold can be configured in Test Suite Settings > Image Search under Squish Vision Defaults.

Squish Vision Defaults in Test Suite Settings

Storing and Using the Image

Once you have selected the image, enter a descriptive file name in the Name field. Squish stores the image in the test suite's shared visual look-up directory (test_suite/shared/searchImages/), where it can be used as an argument to the ScreenRectangle waitForImage(imageFile, [parameterMap], [searchRegion]) function.

When the selection is ready, use Insert mouseClick, Insert doubleClick, or Insert tapObject to perform the action and insert the corresponding script statement into the test script.

To leave the editor without inserting a new script statement, click Cancel to return to the main recording mode.

© 2025 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners.
The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation.
Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.

Search Results