Class ComparisonResult
- java.lang.Object
-
- io.appium.java_client.imagecomparison.ComparisonResult
-
- Direct Known Subclasses:
FeaturesMatchingResult,OccurrenceMatchingResult,SimilarityMatchingResult
public abstract class ComparisonResult extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description ComparisonResult(java.util.Map<java.lang.String,java.lang.Object> commandResult)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]getVisualization()Returns the visualization of the matching result.static org.openqa.selenium.PointmapToPoint(java.util.Map<java.lang.String,java.lang.Object> map)Transforms a map intoPointobject.static org.openqa.selenium.RectanglemapToRect(java.util.Map<java.lang.String,java.lang.Object> map)Transforms a map intoRectangleobject.voidstoreVisualization(java.io.File destination)Stores visualization image into the given file.protected voidverifyPropertyPresence(java.lang.String propertyName)Verifies if the corresponding property is present in the commend result and throws an exception if not.
-
-
-
Method Detail
-
verifyPropertyPresence
protected void verifyPropertyPresence(java.lang.String propertyName)
Verifies if the corresponding property is present in the commend 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
public void storeVisualization(java.io.File destination) throws java.io.IOExceptionStores visualization image into the given file.- Parameters:
destination- file to save image.- Throws:
java.io.IOException- On file system I/O error.
-
mapToRect
public static org.openqa.selenium.Rectangle mapToRect(java.util.Map<java.lang.String,java.lang.Object> map)
Transforms a map intoRectangleobject.- Parameters:
map- the source map.- Returns:
Rectangleobject
-
mapToPoint
public static org.openqa.selenium.Point mapToPoint(java.util.Map<java.lang.String,java.lang.Object> map)
Transforms a map intoPointobject.- Parameters:
map- the source map.- Returns:
Pointobject
-
-