Share this page

# Insight image-based identification (Windows only)

An InsightObject enables UFT Developer 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 UFT Developer 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

https://admhelp.microfocus.com UFT Developer 8942
Tips to improve your search results... UFT Developer Help Center UFT Developer Help 15.0-15.0.2 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: