Tuesday 2 December 2014

Understanding Insight Objects in UFT 11.5!!

With Unified Functional Testing, there were a lot of features like integrating GUI testing and API testing, introducing File Content Checkpoint, and create insight object or recording in Insight mode. In this article I will try to explain what this feature of Insight recording is and how to implement same.

Insight is an image-based identification ability, to recognize objects in application based on what they look like instead of using properties that are part of design. UFT stores an image of the object with insight test objects and uses this image as main description property to identify object in the application. Together with insight property, UFT can use ordinal identifier to uniquely identify the object. Another property we can use is Similarity - Specifies how similar a control in the application has to be to the test object image for it to be considered a match. And Visual relation identifier can also be used to identify the object based on its relative position with respect to other objects in the application. 

Low points of insight object are we cannot add insight object from object spy and snapshots occupy a lot of disk space.

Adding Insight Objects :

UFT allow adding Insight object either in recording Mode or manually in object repository:
1.  Insight Recording: When we record in UFT, There is option to select recording mode. The recording mode in UFT is default, analog, Low Level recording, and Insight recording. When we select recording mode as Insight recording, UFT records object as insight object for images and identifies rest of objects like edit box as window object WinObject and perform action on them.


2.Insight Objects can be added through Object Repository. Go to Resources>Object Repository. This will open Object Repository window. In Object Repository window, Navigate to Object>Add Insight objects to Local. This can also be added by icon as shown below.
Once we click on Add Insight objects to local, UFT asks to select Learn Mode which can be manual and automatic. Manual Mode provides magnifier to select minute objects in the application.


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. 

In the Editor, test object image is displayed in the step instead of the test object name. Enlarge Image is displayed on hovering over the object.

Options available to work with Insight in UFT 11.5:

UFT 11.5 provides following options for working with insight objects. Options for Insight Object are at Tools>Options>GUI Testing>Insight. This pane enables you to define options that customize how UFT handles Insight test objects when creating test object, and during record and run sessions.
Options to customize the insight object are as follows:
 a.   Save the clicked coordinates as the test object’s Click Point when recording a test object.
 b.   When recording a test, display mouse operations.




c.When editing shows test object image in steps and displaying Select learn mode dialog box
d. Snapshots for insight object takes a lot of disk space, we can provide option to limit test object image, maximum pixels around image, and maximum number of snapshots to save when recording a test object




--Sudhakar.Mangi

No comments:

Post a Comment