Deploying and Testing the Preliminary Toolkit Support Set

Supported on versions 2021 R1 and earlier

After defining the MyWpfCalendar test object class in the test object configuration file and mapping the Calendar control to this test object class in the toolkit configuration file, you can already test the effect of using the toolkit support set with UFT One.

Using the DevelopmentMode attribute

When you develop your own toolkit support set, if you modify attributes of Identification Property elements in the test object configuration file, keep the DevelopmentMode attribute of the TypeInformation element set to true during the design stages of the custom toolkit support. Before you deploy the custom toolkit support set for regular use, be sure to remove this attribute (or set it to false). This is not required when performing this tutorial lesson. For more information, see Modifying Identification Property Attributes in a Test Object Configuration FileShared File: ModifyTO_IDProp_att.

Back to top

To deploy the toolkit support set

  1. Copy the MyWpfToolkitTestObjects.xml file to <UFT One installation folder>\dat\Extensibility\WPF.

  2. In the <UFT One installation folder>\dat\Extensibility\WPF folder, create a folder named MyWpfToolkit.

  3. Copy the MyWpfToolkit.cfg file to the <UFT One installation folder>\dat\Extensibility\WPF\MyWpfToolkit folder.

  4. Note: If you were developing support for a Silverlight control, you would replace WPF in the paths above with Slv.

Back to top

To test the toolkit support set

  1. After you deploy the toolkit support set, open UFT One and open a GUI test.

    Note: UFT One reads toolkit support files when it opens. Therefore, if UFT One is open, you must close UFT One and open it again.

    The Add-in Manager dialog box displays MyWpfToolkit as a child of the WPF environment in the list of available add-ins. (If the Add-in Manager dialog box does not open, see the UFT One Help Center for instructions.)

  2. Select the check box for MyWpfToolkit and click OK. UFT One opens and loads the support you designed.

  3. Use the Define New Test Object button in the Object Repository dialog box to open the Define New Test Object dialog box. The MyWpfToolkit environment is displayed in the Environment list. When you select the MyWpfToolkit environment from the list, the MyWpfCalendar test object class that you defined in the test object configuration file is displayed in the Class list.

  4. Select Tools > Object Identification. In the Object Identification dialog box, when you select the MyWpfToolkit environment in the Environment list, the identification property definitions for the MyWpfCalendar test object class should match the definitions in the test object configuration file.

  5. Run the sample control by opening the <WPF and Silverlight Add-in Extensibility SDK installation folder>\samples\WPFExtCalendarSample\Application\WpfCalendar.exe file.

    Note: UFT One establishes its connection with an application when the application opens. Therefore, if the Calendar application is open, you must close it and run it again.

  6. In UFT One, perform the following activities on the Calendar control, to see how UFT One recognizes the control. (For more information on working in UFT One, see the UFT One User Guide.)

    • Use the Object Spy to see how UFT One recognizes the Calendar control and to view its identification properties and test object operations:

      • The calendar is represented by a MyWpfCalendar test object class.

      • The calendar day numbers are still recognized as separate test objects. Later in this tutorial you will customize child object handling to prevent that.

      • The list of test object operations includes all of the operations (methods and properties) inherited from the WpfObject base class, as well as all of the operations that you defined in the MyWpfToolkitTestObjects.xml test object configuration file.

      • The list of identification properties includes all of the properties that you defined in the MyWpfToolkitTestObjects.xml test object configuration file.

      • The is_today_highlighted identification property has no value, because you have not yet implemented its retrieval. For all other identification properties, the value is provided as it would be for a WpfObject (because it is the base class).

    • In the Editor, type MyWpfCalendar("MyCalendar").

      When you type the period, UFT One's statement completion feature displays all of the operations available for the MyWpfCalendar test object class. This includes operations inherited from WpfObject, and ones that you defined in the test object configuration file.

Back to top

Continue to Design the Basic Custom Server.