Open topic with navigation
You have now completed the design required to support running steps on the Book control, performing operations, and retrieving property values.
In this section, you deploy the toolkit support set to UFT again, and test running steps on the Book control. Before deploying, you make the changes that are necessary to support the Documentation column in the Keyword View.
WebExtSampleTestObjects.xml file from the Project Explorer in Extensibility Accelerator and add Documentation elements to the operations you defined. The TypeInfo element should now look like this:
<TypeInfo> <Operation Name="GoToAuthorPage" PropertyType="Method"> <Description>Opens the Web page for the specified author.</Description> <Documentation><![CDATA[Open the Web page for %a1.]]> </Documentation> <Argument Name="AuthorName" IsMandatory="true"> <Type VariantType="String" /> <AdditionalInfo xsi:type="xsd:string">The author.</AdditionalInfo> </Argument> </Operation> <Operation Name="GoToUsedBooksPage" PropertyType="Method"< <Description>Opens the UsedBooks page.</Description> <Documentation><![CDATA[Open the %l UsedBooks page.]]></Documentation> </Operation> <Operation Name="Select" PropertyType="Method"> <Description>Selects the book.</Description> <Documentation><![CDATA[Select the %l book.]]></Documentation> </Operation> </TypeInfo>
Select Project > Deploy > Deploy to UFT.
Close and reopen UFT. Select the check box for WebExtSample in the Add-in Manager dialog box and click OK. UFT opens and loads the support you designed.
Close and rerun the sample control.
Open a GUI test, open the Object Repository, and use the Add Object to Local button to learn the Book control. Make sure that the test object that UFT creates is named The History of QuickTest Professional.
Create a test with the following step and then run the test:
Browser("Book").Page("Book").WebExtBook("The History of QuickTest Professional"). GoToAuthorPage "Jane Doe"
UFT displays a run-time error message with the string provided by the exception, and the test step fails.
Create and run similar tests to test the Select and GoToUsedBooksPage test object methods.
Verify that the documentation strings displayed for the test object operations in the Keyword view are correct.
Create a step with a WebExtBook test object.
Right-click the object and select Insert Standard Checkpoint. The Checkpoint Properties dialog box opens. Make sure that the identification properties you defined in the test object configuration file (title, authors, price, and min_used_price) are included in the list of properties and are selected.
Create and run a test that retrieves each identification property and checks its value, or displays it in a message box. For example, you can run the following test:
The first step checks the value of the authors property, the checkpoint in the second step checks the properties selected in the checkpoint (in this case price and min_used_price) and the third step displays the book's title in a message box.
Click OK to close the message box. The test run is completed and the run results are displayed. Expand the run results tree to view the step details.