Insight image-based identification (Windows only)

An InsightObject enables LeanFT to interact with an object in your application based on its appearance rather than its property values.

You provide an image that represents the object, and LeanFT finds the object in your application (within the parent objects you specify) that matches the image you provided.

To create an InsightObject

  1. Create the image file you want to use to identify the object. The supported formats are: JPEG, BMP, and PNG.

  2. In your test, add the required using or import statements:

    using HP.LFT.SDK.Insight;
    using System.Drawing;
    import com.hp.lft.sdk.insight.*;
    import java.awt.image.*;
  3. Initialize an InsightObject test object class and in the constructor, provide an image.

    For example (C#):

    string bitmapFolder = Directory.GetCurrentDirectory() + "ClearButton.bmp"
    Image image = Image.FromFile(bitmapFolder);
    var clearButton = window.Describe<IInsightObject>(new InsightDescription(image));
  4. You can optionally provide:

    • a similarity property that enables you to control the % tolerance you want to allow.
    • index or VRI definitions in the object description to ensure a unique identification.

See also:

Setting up and working with the JavaScript SDK