RanorexRanorex Documentation
ContainsImage Method (element, image, findOptions, message, exceptionOnFail)
NamespacesRanorexValidateContainsImage(Element, Bitmap, Imaging..::.FindOptions, String, Boolean)
Validates if the screenshot of the specified element contains the given image.
Declaration Syntax
C#Visual BasicVisual C++
public static bool ContainsImage(
	Element element,
	Bitmap image,
	Imaging..::.FindOptions findOptions,
	string message,
	bool exceptionOnFail
)
Public Shared Function ContainsImage ( _
	element As Element, _
	image As Bitmap, _
	findOptions As Imaging..::.FindOptions, _
	message As String, _
	exceptionOnFail As Boolean _
) As Boolean
public:
static bool ContainsImage(
	Element^ element, 
	Bitmap^ image, 
	Imaging..::.FindOptions^ findOptions, 
	String^ message, 
	bool exceptionOnFail
)
Parameters
element (Element)
The element to take the screenshot from.
image (Bitmap)
The image to search inside the element screenshot.
findOptions (Imaging..::.FindOptions)
A Imaging..::.FindOptions instance that defines the options for the search.
message (String)
The message to log. "{0}" is replaced by the string representation of the element.
exceptionOnFail (Boolean)
A value specifying if an exception should be thrown if the validation fails.
Return Value
True if the specified image is contained in the screenshot of the element; otherwise false.
Exceptions
ExceptionCondition
ArgumentNullExceptionIf image is null.
ValidationExceptionIf the validation fails and exceptionOnFail is true.

Assembly: Ranorex.Core (Module: Ranorex.Core) Version: 4.0.3.22982 (4.0.3.22982)