Click or drag to resize
Ranorex

ValidateCompareImage Method (RepoItemInfo, Bitmap, ImagingFindOptions, String, Boolean)

Validates if the screenshot of the specified repository item matches the given image.

Namespace:  Ranorex
Assembly:  Ranorex.Core (in Ranorex.Core.dll) Version: 12.7.4-git.38314c06
Syntax
public static bool CompareImage(
	RepoItemInfo itemInfo,
	Bitmap image,
	ImagingFindOptions findOptions,
	string message,
	bool exceptionOnFail
)

Parameters

itemInfo
Type: Ranorex.Core.RepositoryRepoItemInfo
The RepoItemInfo object for the repository item.
image
Type: System.DrawingBitmap
The image which is compared to the item screenshot.
findOptions
Type: RanorexImagingFindOptions
A ImagingFindOptions instance that defines the options for the comparison.
message
Type: SystemString
The message to log. "{0}" is replaced by the name of the itemInfo object.
exceptionOnFail
Type: SystemBoolean
A value specifying if an exception should be thrown if the validation fails.

Return Value

Type: Boolean
True if the specified image matches the screenshot of the itemInfo; otherwise false.
Exceptions
ExceptionCondition
ArgumentNullExceptionIf image is null.
ValidationExceptionIf the validation fails and exceptionOnFail is true.
See Also