Deploying and Testing the Toolkit Support Set (for Stage 2)

After defining the WebExtUsedBooks test object class in the test object configuration file and the identification rules for this test object class in the toolkit configuration file and JavaScript functions, you can test the effect of using the toolkit support set with UFT One.

To test the toolkit support set:

  1. Deploy the test object configuration file, toolkit configuration file, icon file, and JavaScript file to their correct locations within the UFT One installation folder.

  2. Open UFT One and load the WebExtSample support (select it in the Add-in Manager dialog box).

  3. Open a GUI test and use the Define New Test Object button in the Object Repository dialog box to open the Define New Test Object dialog box. Select the WebExtSample environment from the Environment list to see that the WebExtUsedBooks test object class you defined in the test object configuration file is displayed in the Class list.

  4. Run the sample control by opening the %ALLUSERSPROFILE%\Documents\ExtAccTool\Samples\WebExtSample\Application\Book.htm file and clicking Used.

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

  5. In UFT One, perform the following activities on the UsedBooks 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 view the identification properties and test object operations that are supported for the UsedBooks control. No value is displayed for the title property because you have not yet implemented a JavaScript function that returns its value.

      The test object created for the UsedBooks control is given the name of its test object class, and uses the custom icon you defined. Later in this lesson, you customize your toolkit support set to provide a more specific name.

      The WebExtUsedBooks test object includes all of the test object operations of a WebTable test object, as well as the SelectBook method that you defined in the test object configuration file.

    • Use the Add Objects to Local button in the Object Repository dialog box to learn the UsedBooks control. The custom icon is used to represent the test object in the object repository.

    • In the Keyword View, create a test step choosing the WebExtUsedBooks 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. All of the test object operations supported by WebTable test objects are available, because in the test object configuration file, you defined that the WebExtUsedBooks test object extends (and therefore inherits from) the WebTable test object class.

      • After you choose an operation, the Value cell is partitioned according to the number of arguments of the selected operation. For example, when you create a step with the operation SelectBook, the value cell requires one argument and displays the argument's Name attribute in a tooltip.

      • 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, including the ones inherited from WebTable.

  6. Run a test with a step that performs the SelectBook test object method on a WebExtUsedBooks test object. UFT One searches for a JavaScript function to run the test object method on the control. Because you have not yet implemented support for running test object methods, a run-time error occurs. In the next section, you implement this support.

Continue to Stage 3: Implementing Support for the WebExtUsedBooks Test Object Methods.