com.hp.lft.sdk.insight

Class InsightDescription

  • All Implemented Interfaces:
    CloneableObject, Description, com.hp.lft.sdk.internal.DescriptionWithVri, java.lang.Cloneable


    public class InsightDescription
    extends DescriptionBase
    The description of an Insight test object.
    • Field Summary

      • Fields inherited from class com.hp.lft.sdk.internal.PropertiesDescriptionBase

        properties
    • Constructor Summary

      Constructor and Description
      InsightDescription()
      Creates a new instance of the InsightDescription class.
      InsightDescription(java.awt.image.RenderedImage image)
      Creates a new InsightDescription instance with the given image as the image source to be used.
      Important: Only images of type: BMP, PNG, and JPG are supported.
      InsightDescription(java.awt.image.RenderedImage image, int similarity)
      Creates a new InsightDescription instance with the given image as the image source to be used, and a similarity value.
    • Method Summary

      Modifier and TypeMethod and Description
      java.awt.image.RenderedImagegetImage()
      Returns the image that will be used as the source image for the Insight test object.
      java.lang.IntegergetSimilarity()
      Returns the percentage value that specifies how similar a control in the application has to be to the test object image for it to be considered a match.
      voidsetImage(java.awt.image.RenderedImage image)
      Sets the image, that will be used as the source image for the Insight test object.
      Important: Only images of type: BMP, PNG, and JPG are supported.
      voidsetSimilarity(java.lang.Integer similarity)
      Sets the percentage value that specifies how similar a control in the application has to be to the test object image for it to be considered a match.
      • Methods inherited from class com.hp.lft.sdk.internal.PropertiesDescriptionBase

        getValueAs, getValueAsStringProperty, insertValue
      • Methods inherited from class java.lang.Object

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

      • InsightDescription

        public InsightDescription()
        Creates a new instance of the InsightDescription class.
      • InsightDescription

        public InsightDescription(java.awt.image.RenderedImage image)
                           throws GeneralLeanFtException
        Creates a new InsightDescription instance with the given image as the image source to be used.
        Important: Only images of type: BMP, PNG, and JPG are supported. Behavior for other image types is undefined.
        The default similarity value (80%) is used.
        Parameters:
        image - a RenderedImage representing the image to use for a visual match UFT Developer will search the parent Test Object for (Only images of type: BMP, PNG, and JPG are supported).
        Throws:
        GeneralLeanFtException - if an error occurs during execution.
      • InsightDescription

        public InsightDescription(java.awt.image.RenderedImage image,
                                  int similarity)
                           throws GeneralLeanFtException
        Creates a new InsightDescription instance with the given image as the image source to be used, and a similarity value.
        Parameters:
        image - a RenderedImage representing the image to use for a visual match UFT Developer will search the parent Test Object for.
        similarity - a percentage value that specifies how similar a control in the application has to be to the test object image for it to be considered a match.
        Throws:
        GeneralLeanFtException - if an error occurs during execution.
    • Method Detail

      • setImage

        public void setImage(java.awt.image.RenderedImage image)
                      throws GeneralLeanFtException
        Sets the image, that will be used as the source image for the Insight test object.
        Important: Only images of type: BMP, PNG, and JPG are supported. Behavior for other image types is undefined.
        Parameters:
        image - the image, that will be used as the source image for the Insight test object (Only images of type: BMP, PNG, and JPG are supported).
        Throws:
        GeneralLeanFtException - if an error occurs during execution.
      • getImage

        public java.awt.image.RenderedImage getImage()
                                              throws GeneralLeanFtException
        Returns the image that will be used as the source image for the Insight test object.
        Returns:
        the image that will be used as the source image for the Insight test object.
        Throws:
        GeneralLeanFtException - if an error occurs during execution.
      • setSimilarity

        public void setSimilarity(java.lang.Integer similarity)
        Sets the percentage value that specifies how similar a control in the application has to be to the test object image for it to be considered a match.
        Parameters:
        similarity - the percentage value that specifies how similar a control in the application has to be to the test object image for it to be considered a match.
      • getSimilarity

        public java.lang.Integer getSimilarity()
        Returns the percentage value that specifies how similar a control in the application has to be to the test object image for it to be considered a match.
        Returns:
        the percentage value that specifies how similar a control in the application has to be to the test object image for it to be considered a match.