Open topic with navigation
The following steps were performed to implement the IRecordable interface:
The following line was added to the CTEASampleTestableImp class inheritance list:
public IDispatchImpl<IRecordable, &__uuidof(IRecordable),&LIBID_AutInterface>
The following line was added to the CTEASampleTestableImp class' COM Map:
The following line was added in the TEASampleTestableImp.h file, to enable the Testing Agent to call methods from the UFT Extensibility Agent type library:
UFT calls BeginRecording or EndRecording when the user starts or ends a recording session. The BeginRecording and EndRecording methods can therefore be implemented to initialize or reset variables pertaining to a recording session and to activate or deactivate dynamic recording suppression.
During a recording session, the Testing Agent can instruct UFT to add steps to the GUI test based on the operations that the user performs on the application. To do this, the Testing Agent calls the Record API callback method that UFT provides in the IRecorder interface. This interface is defined in the UFT Extensibility Agent type library.
In addition, the Testing Agent can instruct UFT to refrain from recording native steps on the application, by calling the Suppress/UnSuppress API methods from the IRecordSuppressor interface. For more information, see Recording Test Object Method Steps and Suppressing UFT Native Recording.
The BeginRecording method receives a reference to an object that exposes the IRecorder and IRecordSuppressor interfaces. The Testing Agent will use this reference to access the IRecorderand IRecordSuppressor interface methods.
BeginRecording was implemented to:
Call the CTEASampleTestableImp::SuppressWindow method, which handles native recording suppression (for more information, see Suppressing and UnSuppressing Native Recording).
EndRecording was implemented to call the CTEASampleTestableImp::UnSuppressWindow method, to turn off the native recording suppression. For more information, see Suppressing and UnSuppressing Native Recording.