Click or drag to resize
Ranorex

ImagingFindSingle Method (Element, Bitmap)

Searches for the specified feature in (a screenshot of) the element using DefaultImagingFindOptions.

Namespace:  Ranorex
Assembly:  Ranorex.Core (in Ranorex.Core.dll) Version: 12.7.4-git.38314c06
Syntax
public static ImagingMatch FindSingle(
	Element element,
	Bitmap feature
)

Parameters

element
Type: Ranorex.CoreElement
The element to make a screenshot of in which will be searched.
feature
Type: System.DrawingBitmap
The image to search for.

Return Value

Type: ImagingMatch
The first or best ImagingMatch found (as specified in the Default options).
Exceptions
ExceptionCondition
RanorexExceptionIf capturing a screenshot of the element fails.
ArgumentNullExceptionIf element is null.
ArgumentNullExceptionIf feature is null.
ArgumentExceptionIf the feature is greater in size than the screenshot of the element.
ArgumentExceptionIf the bitmap format of the feature cannot be converted to that (color image, Format24bppRgb) of the screenshot of the element.
ImageNotFoundExceptionIf the feature could not be found.
See Also