Class InsightDescription

java.lang.Object
com.hp.lft.sdk.internal.PropertiesDescriptionBase
com.hp.lft.sdk.PropertiesDescription
com.hp.lft.sdk.DescriptionBase
com.hp.lft.sdk.insight.InsightDescription
All Implemented Interfaces:
CloneableObject, Description, com.hp.lft.sdk.internal.DescriptionWithVri, Cloneable

public class InsightDescription extends DescriptionBase
The description of an Insight test object.
  • Constructor Details

    • InsightDescription

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

      public InsightDescription(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 - RenderedImage representing the image to use for a visual match. This image is searched for within the parent Test Object (Only images of type: BMP, PNG, and JPG are supported).
      Throws:
      GeneralLeanFtException - if error occurs during execution
    • InsightDescription

      public InsightDescription(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 OpenText Functional Testing for Developers 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 error occurs during execution
  • Method Details

    • setImage

      public void setImage(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 error occurs during execution
    • getImage

      public 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 error occurs during execution
    • setSimilarity

      public void setSimilarity(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 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.