Class ComparisonResult

    • 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.Point mapToPoint​(java.util.Map<java.lang.String,​java.lang.Object> map)
      Transforms a map into Point object.
      static org.openqa.selenium.Rectangle mapToRect​(java.util.Map<java.lang.String,​java.lang.Object> map)
      Transforms a map into Rectangle object.
      void storeVisualization​(java.io.File destination)
      Stores visualization image into the given file.
      protected void verifyPropertyPresence​(java.lang.String propertyName)
      Verifies if the corresponding property is present in the commend result and throws an exception if not.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ComparisonResult

        public ComparisonResult​(java.util.Map<java.lang.String,​java.lang.Object> commandResult)
    • 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.IOException
        Stores 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 into Rectangle object.
        Parameters:
        map - the source map.
        Returns:
        Rectangle object
      • mapToPoint

        public static org.openqa.selenium.Point mapToPoint​(java.util.Map<java.lang.String,​java.lang.Object> map)
        Transforms a map into Point object.
        Parameters:
        map - the source map.
        Returns:
        Point object