Class ComparisonResult
java.lang.Object
io.appium.java_client.imagecomparison.ComparisonResult
- Direct Known Subclasses:
FeaturesMatchingResult,OccurrenceMatchingResult,SimilarityMatchingResult
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbyte[]Returns the visualization of the matching result.static org.openqa.selenium.PointmapToPoint(Map<String, Object> map) Transforms a map intoPointobject.static org.openqa.selenium.RectangleTransforms a map intoRectangleobject.voidstoreVisualization(File destination) Stores visualization image into the given file.protected voidverifyPropertyPresence(String propertyName) Verifies if the corresponding property is present in the command result and throws an exception if not.
-
Field Details
-
commandResult
-
-
Constructor Details
-
ComparisonResult
-
-
Method Details
-
getResultAsMap
-
verifyPropertyPresence
Verifies if the corresponding property is present in the command result and throws an exception if not.- Parameters:
propertyName- the actual property name to be verified for presence
-
getVisualization
public byte[] getVisualization()Returns the visualization of the matching result.- Returns:
- The visualization of the matching result represented as base64-encoded PNG image.
-
storeVisualization
Stores visualization image into the given file.- Parameters:
destination- File path to save the image to.- Throws:
IOException- On file system I/O error.
-
mapToRect
Transforms a map intoRectangleobject.- Parameters:
map- the source map.- Returns:
Rectangleobject
-
mapToPoint
Transforms a map intoPointobject.- Parameters:
map- the source map.- Returns:
Pointobject
-