Validates if the screenshot of the specified element contains the given image.
| C# | Visual Basic | Visual C++ |
public static bool ContainsImage( Element element, Bitmap image, Imaging..::.FindOptions findOptions, string message, bool exceptionOnFail )
- 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.
True if the specified image is contained in the
screenshot of the element; otherwise false.
| Exception | Condition |
|---|---|
| ArgumentNullException | If image is null. |
| ValidationException | If the validation fails and
exceptionOnFail is true. |
