Implementing GetActiveScreen

The level of detail provided in the Active Screen affects the test editing options available to a UFT One user working with the Active Screen. For example, when a UFT One user adds an object to a test or to the object repository from the Active Screen, UFT One uses only the object information stored in the Active Screen. To enable the UFT One user to add an object that was not originally included in any test steps, the Active Screen information must include the identification properties that comprise the test object's description and an indication that these are the description properties. Additional identification properties can also be included.

To enable the UFT One user to add a checkpoint from the Active Screen, the Active Screen information must include the test object identification properties for which you specified a ForVerification attribute in the testing environment XML.

For more information on the implications of selecting each level of detail, see the UFT One User Guide.

UFT One captures the Active Screen after switching the focus to the application window. To enable UFT One to switch the focus, you must implement the GetHWND method in the IHWNDSupplier interface.

The following diagram shows the general sequence of methods that UFT One calls when it captures an Active Screen during a Record session. This illustrates the purpose of the methods that the Testing Agent must implement. For every user operation that needs to be recorded, the Testing Agent calls the Record method. At this point, if the Active Screen Capture level in UFT One is set to a value other than None, UFT One calls GetHWND in the IHWNDSupplier interface and then GetActiveScreen in the IActiveScreenSupplier interface.

The following diagram shows the general sequence of methods that UFT One calls when it saves a step screen capture for the run results report. This illustrates the purpose of the methods that the Testing Agent must implement.