Web Add-in Extensibility Developer Guide > Web Add-in Extensibility API reference > Mercury.QTP.ToolkitManager Namespace > _util Class > _util Class Methods > Record Method

_util.Record Method

Adds a step to the test and adds a test object to the object repository if it is not already there.


Use this method in a JavaScript function that records a step in a test after an event occurs on a control.


public function Record( 
   methodName : String,
   parameters : Object[],
   delay : int


The name of the recorded test object method.

The parameters for the recorded test object method.

This argument is a SafeArray. To convert an array to a SafeArray, you can use the toSafeArray(array) function that Web Add-in Extensibility provides. This function is defined in <UFT Web Add-in Extensibility installation folder>\dat\Extensibility\Web\Toolkits\common.js.


For future use.

Must be 0.


The following JavaScript function supports recording a step in UFT when a user selects a date in a .NET ASP AJAX Calendar during a recording session:

function OnSet()
  if ( _elem.value && _elem.value != "" )
     var arr = new Array();
     arr[0] = _elem.value;
     _util.Record( "Set", toSafeArray(arr), 0);
  return true;


The recorded step will be similar to this one:

Browser("Calendar Sample").Page("Calendar Sample").ASPAjaxCalendar("ctl00_SampleContent_Date1").Set "10/22/2008"