 | ValidateCompareImage Method (Element, Bitmap, ImagingFindOptions, String, ValidateOptions) |
Validates if the screenshot of the specified element matches the given image.
Namespace:
Ranorex
Assembly:
Ranorex.Core (in Ranorex.Core.dll) Version: 12.7.4-git.38314c06
Syntaxpublic static bool CompareImage(
Element element,
Bitmap image,
ImagingFindOptions findOptions,
string message,
ValidateOptions options
)
Public Shared Function CompareImage (
element As Element,
image As Bitmap,
findOptions As ImagingFindOptions,
message As String,
options As ValidateOptions
) As Boolean
Parameters
- element
- Type: Ranorex.CoreElement
The element to take the screenshot from. - image
- Type: System.DrawingBitmap
The image which is compared to the element 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 string
representation of the element. - options
- Type: RanorexValidateOptions
Additional ValidateOptions for this validation action.
Return Value
Type:
BooleanTrue if the specified
image matches the
screenshot of the
element; otherwise
false.
Exceptions
See Also