IEngineResult

The result type that is returned by image and text searches (and some other interactions with the Teste). Depending on the search you can get an TextDetectionResult or an ElementDetectionResult if the search was successful or a DefaultFailedResult if it wasn't.

Properties

Name

Description

HasFailed

True if the image or text was not found, false if the search was successful.

HasSucceeded

True if the image or text was found, false if the search was unsuccessful.

Boundary

A ResultRectangle with the coordinates of the rectangle on the SUT that contains the image or text that was searched. If search was unsuccessful, this will be ResultRectangle.Empty

Location

A Nullable Point indicating the coordinates of the hotspot of the image or the middle of the boundary rectangle. This point will be used when we use an IEngineResult for a Click method or for other methods that expect a point but also offer an overload with IEngineResult. If search was unsuccessful, this will be null.

Since it's nullable, you have to use .Value to access the point. E.g.

if (result.HasSucceeded)

t.Testee.Mouse.Down(result.Location.Value);

Last updated