Enhancing Your UFT Testing Agent > Developing Support for Screen Captures > Implementing GetActiveScreen

Implementing GetActiveScreen

The level of detail provided in the Active Screen affects the test editing options available to a UFT user working with the Active Screen. For example, when a UFT user adds an object to a test or to the object repository from the Active Screen, UFT uses only the object information stored in the Active Screen. To enable the UFT 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 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 Micro Focus Unified Functional Testing User Guide.

UFT captures the Active Screen after switching the focus to the application window. To enable UFT 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 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 is set to a value other than None, UFT calls GetHWND in the IHWNDSupplier interface and then GetActiveScreen in the IActiveScreenSupplier interface.

The following diagram shows the general sequence of methods that UFT 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.