Developing an Agent Object to Support a Custom Grid Control

The Agent Object must provide support for all of the test object methods and identification properties defined in the test object class mapped to the grid control. These include grid operations such as SetCellData and GetCellData, and any other methods and properties that you define in the test object class.

The UFT Delphi Add-in provides a test object extension (Mercury.DelphiTableSrv) that implements much of the design required to support grid controls.

This extension implements basic grid operations like SetCellData, GetCellData, SelectCell, and so on. The extension delegates these test object methods to the Agent Object using the __CellRect, __CellData, __TableContent, RowCount, and ColCount published properties.

To create support for a custom grid control, you must design an Agent Object that inherits from TMicGridAOBase or TCustomGridAOBase and implements these published properties. (For more information about the TMicGridAOBase or TCustomGridAOBase base classes, see <UFT installation folder>\dat\Extensibility\Delphi\AgentExtensibilitySDK.pas.)

In addition, you must instruct UFT to use the grid test object extension to support your custom grid.

Note: If you map the custom control to a custom test object class, design the Agent Object to support any additional test object methods and identification properties defined in the test object class.

Implementing the Published Properties for Supporting a Grid

The support that you develop for a custom grid control is based on the Delphi Add-in grid test object extension. Therefore, you must implement the following published properties in your Agent Object: