Relevant for: GUI tests and components
What is the Add Insight Test Object dialog box? This dialog box enables you to modify the image stored with an Insight test object. UFT uses the image stored to identify the relevant control in the application.
Note: When adding an InsightObject.GetVisibleText method call to your test or component, you can use the Text Area Helper button on this dialog box to determine the coordinates that you need to provide as arguments.
Do one of the following:
Perform the first steps described in Work with Insight test objects.
This dialog box opens after you select the control in the application and a snapshot of it is created (automatically or manually).
What do you want to know?
When UFT captures Insight images while recording, it may take a series of images of the control. The images are derived from snapshots taken of the entire application.
- The highlighted image is the one stored with the test object.
- The sequence may show additional images, taken shortly before and/or after the stored one.
- When you select an image, the snapshot display below displays the corresponding application snapshot. Adjust the image stored with the test object by moving or resizing the highlighted rectangle in the snapshot display.
- Configure the size and number of snapshots to include in the sequence (Select Tools > Options > GUI Testing tab > Insight node).
In the object repository, you need to first either select an existing Insight test object or click the Add Insight to Local button . If you are replacing an existing snapshot, click the Take/Replace Snapshot button.
When you click this button, UFT is minimized, and the mouse pointer changes to a crosshair, which you can use to draw a rectangle around the control and take the snapshot.
To help you accurately draw the borders of the control, a magnified view of the mouse location on the screen is displayed in a circle near the crosshair.
By holding the left CTRL, you can temporarily change the crosshair to a standard pointer, enabling you to change the window focus or perform operations in UFT or in your application.
Yes. Use the controls in the Exclude Areas toolbar:
Select area to exclude/Select additional areas to exclude . When you click this button, the mouse pointer changes to a crosshair, enabling you to draw a rectangle within the test object image. This does not clear existing excluded areas.
To draw multiple areas to exclude, press and hold the CTRL key while you draw.
Clear All. Clears all excluded areas, so that the full test object image is included.
To clear only one excluded area, hover over the area and press the DELETE key or click the Clear area button that pops up beside the area.
Note: Make sure that the included area contains enough significant content to enable object recognition.
This button provides the coordinates of an area that you specify within the test object image, in the format to use when calling InsightObject.GetVisibleText.
Click the Text Area Helper button and draw a rectangle, inside the test object image, around the area from which you want to retrieve text. The command syntax to use for the GetVisibleText method is displayed next to the button.
Note: This does not affect the test object image and does not retrieve the text. It is a utility to help you determine the arguments to use for the GetVisibleText method if you want to call it in a test or component.
The insight mechanism is not sensitive to all differences in color, and does not support text recognition. Therefore, define the borders of your test object image around visually distinct borders, templates, shades, icons, or shapes. This is particularly relevant when capturing images that contain sharp contrasts.
You may also want to learn: