TesterDebugExtensions Methods

SaveDebugImages

For debugging with the Visual Designer: Saves the debug images from the last text or image search to the local file system. Can help to determine why an image or a text was not found. This method can easily be called as t.SaveDebugImages() from the Visual Studio Immediate Window.

In order to save the debug images, CaptureRawImages needs to be enabled in IDebug. i.e. t.Debug.CaptureRawImages = true;

This method will attempt to save three images:

source.png: The filtered image of the SUT screen which was used for the search. This often helps to identify a wrong Select filter. Corresponds to t.Debug.LastSource

searchImage.png: The image that was searched for. Note: If you search for a collection of image (a folder), only one of the images will be saved. For text searches this is not applicable and nothing is saved. Corresponds to t.Debug.LastLookFor

debug.png: The resulting image of the search. For text searches, this is the source image overlaid with all detected text/characters. For template image searches, the image of the folding, a completely white pixel corresponds to a perfect match (DetectedPrecision = 1), a black pixel to no match (DetectedPrecision = 0). For precise image searches this is not applicable and nothing is saved. Corresponds to t.Debug.Image

Syntax:

public static void SaveDebugImages(
    this ITester t,
    string rootPath = @"C:\Temp\Images\"
)

Parameters:

Parameter

Description

t

Type: ITester The ITester interface on which the extension is called.

[rootPath]

Type: string

The path were the images shall be saved, by default in "C:\Temp\Images".

Last updated