About Enhancing Your UFT Testing Agent

After you complete the implementation of the mandatory ITestable interface, you can implement the additional interfaces in the SDK to support more advanced UFT capabilities such as Record, Active Screen, Highlight, creating checkpoints. These interfaces are defined in the UFT Extensibility Agent type library.

The following table shows the interfaces that you need to implement for each UFT capability and the methods included in each interface:

Supported UFT Capability

Interface to Implement

API Methods

Object Spy

ISpyable

GetElementFromPoint

Accessing native properties and operations

IRunTimeObjectSupplier

GetRunTimeObject

Record

IRecordable

BeginRecording

EndRecording

Active Screen

IActiveScreenSupplier, IHWNDSupplier

GetActiveScreen

GetHWND

Highlight

IRectangleSupplier, IHWNDSupplier

GetRectangle

GetHWND

Bitmap Checkpoint

IRectangleSupplier or ITestable (GetProperties: width and height properties)

GetRectangle

or GetProperties (width and height)

Visual Relation Identifiers

IRectangleSupplier or ITestable (GetProperties: abs_x, abs_y, width and height properties)

GetRectangle

or GetProperties (abs_x, abs_y, width and height)

Test Event Notification (UFT notifies the Testing Agent)

ITestEvents, ITestEvents2

BeginRun

BeginRun2 (implement if you want to add lines to the UFT run results)

PreEndRun

EndRun

PauseRun

ResumeRun

TestHasBeenClosed

Disconnect

Perform your development in stages, adding support for one UFT capability at a time and testing after each stage.