Enhancing Your UFT Testing Agent > Developing Support for Recording > Implementing BeginRecording and EndRecording

Implementing BeginRecording and EndRecording

UFT calls the BeginRecording method when a UFT user starts a recording session. The BeginRecording method receives a reference to a UFT Testing Extensibility object that exposes the IRecorder and IRecordSuppressor interfaces. While the recording session is active, the Testing Agent uses the IRecorder::Record callback method to inform UFT of every operation that needs to be recorded. For more information, see Recording Test Object Method Steps . The Testing Agent can also use IRecorder2::RecordLine to add additional VBScript lines to the test during the recording session.

When a recording session begins, the Testing Agent can call the IRecordSuppressor::Suppress method to suppress native recording on processes and windows that are already open. For more information, see Suppressing UFT Native Recording.

UFT calls the EndRecording method when the UFT user stops the recording session. This informs the Testing Agent that the reference to the UFT Testing Extensibility object is no longer valid, and that the Testing Agent must not use any members of the IRecorder and IRecordSuppressor interfaces.