Share this page

com.hp.lft.sdk.insight

## 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, java.lang.Cloneable

      public class InsightDescription
      extends DescriptionBase

  The description of an Insight test object.

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class com.hp.lft.sdk.DescriptionBase

      `DescriptionBase.Builder, DescriptionBase.Init<T extends DescriptionBase.Init<T>>`

  - ### 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 Type | Method and Description
    --- | ---
    `java.awt.image.RenderedImage` | `getImage()` Returns the image that will be used as the source image for the Insight test object.
    `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.
    `void` | `setImage(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.
    `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.

    - ### Methods inherited from class com.hp.lft.sdk.DescriptionBase

      `cloneTo, getIndex, getIndexType, getVRI, setIndex, setIndexType, setVRI, setVRI`

    - ### Methods inherited from class com.hp.lft.sdk.PropertiesDescription

      `clone`

    - ### 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`

    - ### Methods inherited from interface com.hp.lft.sdk.CloneableObject

      `clone`

- - ### 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.

Tips to improve your search results... UFT Developer Java SDK Reference Version 15.0-15.0.2 UFT Developer SDK Reference All View Local Help Center View Online Help Center back Go back in browser history forward Go forward in browser history Remove search highlights next topic Go to next topic previous topic Go to previous topic Print the current topic Version: