TesterSelectExtensions Methods

SelectFromColorAtPoint

Overload List

Name

Description

Returns a Select filter that contains the connected region of the same color (floodfill) on the filtered current screen starting from the Hotspot (or middle) of the imagesearch with the provided imageReference. Throws a TestStepAbortedException, if the image cannot be found on screen.

Returns a Select filter that contains the connected region of the same color (floodfill) on the filtered current screen starting from the hotspot or Location of the provided position.

Returns a Select filter that contains the connected region of the same color (floodfill) on the filtered current screen starting from the provided point.

SelectFromColorAtPoint(ITester, ImageReference, Double, TimeSpan, ImageDetectionParameters, IImageFilter[ ])

Returns a Select filter that contains the connected region of the same color (floodfill) on the filtered current screen starting from the Hotspot (or middle) of the imagesearch with the provided imageReference. Throws a TestStepAbortedException, if the image cannot be found on screen.

Syntax:

public static Select SelectFromColorAtPoint(
	this ITester t,
	ImageReference imageReference,
	double tolerance = 0.004,
	TimeSpan searchTime = default,
	ImageDetectionParameters parameters = null,
	params IImageFilter[] filters
)

Parameters:

Parameter

Description

t

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

imageReference

Type: ImageReference Image reference for the imageSearch.

[tolerance]

Type: Double The tolerance for the floodfill, max allowed differences in each RGB color channels. Default tolerance 0.004 = roughly 1 px. (255 / tolerance = 1)

[searchTime]

Type: TimeSpan The timeSpan indicating for how long shall be searched.

[parameters]

Type: ImageDetectionParameters

The image parameters for the imagesearches.

[filters]

Type: IImageFilter[ ] The filters for the imagesearch AND the floodfill algorithm. If different filters are required to find the orign point and for the floodFill, do a normal FindImage first and use SelectFromColorAtPoint signature with Point.

Return Value:

A Select filter.

SelectFromColorAtPoint(ITester, IEngineResult, Double, IImageFilter[ ])

Returns a Select filter that contains the connected region of the same color (floodfill) on the filtered current screen starting from the hotspot or Location of the provided position.

Syntax:

public static Select SelectFromColorAtPoint(
	this ITester t,
	IEngineResult position,
	double tolerance = 0.004,
	params IImageFilter[] filters
)

Parameters:

Parameter

Description

t

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

position

Type: IEngineResult The origin for the floodfill. This is often the Position property of a BaseScreen that was found before (e.g. in Initialize method).

[tolerance]

Type: Double The tolerance for the floodfill, max allowed differences in each RGB color channels. Default tolerance 0.004 = roughly 1 px. (255 / tolerance = 1)

[filters]

Type: IImageFilter[ ] The filters that shall be used for the floodfill algorithm.

Return Value:

A Select filter.

SelectFromColorAtPoint(ITester, Point, Double, IImageFilter[ ])

Returns a Select filter that contains the connected region of the same color (floodfill) on the filtered current screen starting from the provided point.

Syntax:

public static Select SelectFromColorAtPoint(
	this ITester t,
	Point origin,
	double tolerance = 0.004,
	params IImageFilter[] filters
)

Parameters:

Parameter

Description

t

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

origin

Type: Point The origin for the floodfill.

[tolerance]

Type: Double The tolerance for the floodfill, max allowed differences in each RGB color channels. Default tolerance 0.004 = roughly 1 px. (255 / tolerance = 1)

[filters]

Type: IImageFilter[ ] The filters that shall be used for the floodfill algorithm.

Return Value:

A Select filter.

SelectFromTopLeftAndBottomRightImages

Returns a Select filter formed by Hotspots (or middle if no hotspot set) of topLeftImage and bottomRightImage. Throws TestStepAbortedException if Images not found.

Syntax:

public static Select SelectFromTopLeftAndBottomRightImages(
	this ITester t,
	ImageReference topLeftImage,
	ImageReference bottomRightImage,
	TimeSpan searchTime = default,
	ImageDetectionParameters parameters = null,
	params IImageFilter[] filters
)

Parameters:

Parameter

Description

t

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

topLeftImage

Type: ImageReference The image which hotspot or middle marks the top left corner of the select.

bottomRightImage

Type: ImageReference

The image which hotspot or middle marks the bottom right corner of the select

[searchTime]

Type: TimeSpan

How long the search for the image should last at most.

[parameters]

Type: ImageDetectionParameters The tolerance for the floodfill, max allowed differences in each RGB color channels. Default tolerance 0.004 = roughly 1 px. (255 / tolerance = 1)

[filters]

Type: IImageFilter[ ] Typically a Select filter indicating the area of interest for the image searches.

Return Value:

A Select filter.

Last updated