Open topic with navigation
After defining the WebExtBook test object class in the test object configuration file and the identification rules for 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 File.
Copy the WebExtSampleTestObjects.xml file to <UFT installation folder>\dat\Extensibility\Web.
In the <UFT installation folder>\dat\Extensibility\Web\Toolkits folder, create a folder named WebExtSample.
Copy the WebExtSample.xml file to the <UFT installation folder>\dat\Extensibility\Web\Toolkits\WebExtSample folder.
In the <UFT installation folder>\dat\Extensibility\Web\Toolkits\WebExtSample folder, create a folder named Res.
Place the WebBook.ico file in <UFT installation folder>\dat\Extensibility\Web\Toolkits\WebExtSample\Res folder.
After you deploy the toolkit support set, open UFT.
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 the WebExtSample as a child of the Web 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 WebExtSample 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 WebExtSample environment is displayed in the Environment list. When you select the WebExtSample environment from the list, the WebExtBook test object class that you defined in the test object configuration file is displayed in the Class list, with the icon that you specified in the WebExtSampleTestObjects.xml file.
Run the sample control by opening the %ALLUSERSPROFILE%\Documents\ExtAccTool\Samples\WebExtSample\Application\Book.htm file.
Note: UFT establishes its connection with an application when the application opens. Therefore, if the Book control is open, you must close it and run it again.
In UFT, perform the following activities on the Book 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 view the identification properties and test object operations that are supported for the Book control:
The WebExtBook test object created for the Book control is given the name of its test object class. Later in this lesson, you customize your toolkit support set to provide a more specific name.
The list of test object operations includes all of the operations (methods and properties) inherited from the WebElement base class, as well as all of the methods that you defined in the WebExtSampleTestObjects.xml test object configuration file.
The list of identification properties includes all of the properties that you defined in the WebExtSampleTestObjects.xml test object configuration file. The property values are not displayed because you have not yet implemented a method that returns property values from the application (and the WebElement base class does not support these properties). You will implement such a method later in this lesson.
Use the Add Objects to Local button in the Object Repository dialog box to learn the Book control. Ensure that the correct icon is used to represent the test object in the object repository.
In the Keyword View, create a test step choosing the WebExtBook object from the object repository in the Item column.
The list of available operations in the Operation column reflects the definitions in the test object configuration file.
After you select an operation, UFT displays the Name attribute of the operation's argument in a tooltip for the Value cell. If you define an operation with more than one argument, the Value cell is partitioned according to the number of arguments of the operation, when selected.
The descriptions and documentation strings you defined for test object methods in the test object configuration file are displayed in tooltips and in the Documentation column, respectively.
In the Editor, create a test step with a WebExtBook test object. The statement completion feature displays all of the operations available for the test object, based on the definitions in the test object configuration file.
If you defined possible values for the operation's arguments (in the ListOfValues element), they are displayed in a statement completion list as well. Later in this lesson, you learn how to enable a control to dynamically provide a list of possible argument values. You develop support for providing a list of the authors that can be used for the AuthorName argument of the GoToAuthorPage operation.