Relevant for: GUI tests and components
Insight enables UFT to recognize objects in your application based on what they look like, instead of properties that are part of their design. This can be useful if you are working with an application whose technology is not supported by UFT, or with an application running on a remote computer.
With Insight, UFT stores an image of the object with the Insight test object (along with ordinal identifiers, if necessary), and uses this image as the main description property to identify the object in the application
You can create InsightObject test objects during recording sessions, or when adding test objects to an object repository manually.
When adding objects to an object repository, you can add an object directly from the application, or even from a picture of the object displayed on your screen.
In the object repository, you can edit the object's properties, such as its name and image, and the default location to click in the control when performing test object methods. You can also define visual relation identifiers to improve UFT's ability to accurately identify the object.
Note: Insight is supported only on the primary monitor.
UFT learns Insight objects using the following elements:
UFT stores an image of the object for the description property. This image is used later to identify the object.
If parts of the object do not always look the same, you can instruct UFT to ignore those areas when it uses the image to identify the object.
UFT can use an ordinal identifier to create a unique description for the object.
Other aspects of object configuration, such as mandatory and assistive properties, and smart identification, are not relevant for Insight test objects.
|Visual relation identifiers||
After UFT creates a description for an Insight test object, add visual relation identifiers to improve identification of the object.
Add the similarity to the test object description.
This property is a percentage that specifies how similar a control in the application has to be to the test object image for it to be considered a match.
The Insight object is always added to the object repository as a child of the test object that represents its containing application, such as a Window or Browser object. (The new object's parent object is also added if it does not already exist in the object repository.)
Note: Insight test objects require more disk space than other test objects, because of the test object images and the snapshots stored with the test objects.
To control the amount of space used, limit the size of the snapshot in the Insight Pane (Options Dialog Box > GUI Testing Tab).
After you add all of the relevant test objects and finish modifying them to your satisfaction in the object repository, you can delete all of the snapshots to reduce the amount of disk space used.
Create steps using Insight test objects in much the same way as you would with other types of test objects.
In the Editor, the test object image is displayed in the step instead of the test object name. When you hold the cursor over the image, an enlarged view of the image is displayed. Double-click the image to open the object repository with the InsightObject selected.
Tip: To show these images, select the relevant option in the Options dialog box (Tools > Options > GUI Testing tab > Insight pane).
During a run session, UFT searches for the Insight test object that matches the image stored with the test object.
UFT searches for the matching object within the Insight object's parent test object. You can help focus the search on a smaller area by creating smaller parent objects and building a hierarchy of Insight test objects in your object repository.
UFT's image matching algorithm allows for some variation, enabling UFT to recognize the object even if it changed slightly. However, the algorithm is not based on object properties, and therefore does not use the smart identification mechanism.
Note: Steps with Insight objects may take longer than usual to run, especially if there are many similar objects with the same parent.