Open topic with navigation
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.
Note: 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.
Copy the MyWpfToolkitTestObjects.xml file to <UFT installation folder>\dat\Extensibility\WPF.
In the <UFT installation folder>\dat\Extensibility\WPF folder, create a folder named MyWpfToolkit.
Copy the MyWpfToolkit.cfg file to the <UFT installation folder>\dat\Extensibility\WPF\MyWpfToolkit folder.
Note: If you were developing support for a Silverlight control, you would replace
WPF in the paths above with
After you deploy the toolkit support set, open UFT and open a GUI test.
Note: UFT reads toolkit support files when it opens. Therefore, if UFT is open, you must close UFT 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 Micro Focus Unified Functional Testing Add-ins Guide for instructions.)
Select the check box for MyWpfToolkit and click OK. UFT opens and loads the support you designed.
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.
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.
Run the sample control by opening the <WPF and Silverlight Add-in Extensibility SDK installation folder>\samples\WPFExtCalendarSample\Application\WpfCalendar.exe file.
Note: UFT 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.
In UFT, perform the following activities on the Calendar control, to see how UFT recognizes the control. (For more information on working in UFT, see the Micro Focus Unified Functional Testing User Guide.)
Use the Object Spy to see how UFT 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'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.
Continue to Design the Basic Custom Server.