Designing the Test Object Configuration File

You use the test object configuration file to introduce the WebExtSample environment and its test object model to UFT One.

The PackageName attribute in the TypeInformation element associates this test object configuration file (and the test objects defined in it) with the WebExtSample environment. If, when UFT One opens, you do not select the WebExtSample environment, UFT One ignores the test object class definitions in this file.

For more information on the elements and attributes in the test object configuration file, see the UFT One Test Object Schema Help.

To define the WebExtSample test object model in the test object configuration file:

Enter the text below in the WebExtSampleTestObjects.xml file that you created in Stage 1: Creating the Toolkit Support Set. This defines the WebExtSample environment and the WebExtBook test object class (including its test object methods and identification properties) according to the details described in the Web Add-in Extensibility Planning Checklist.

<?xml version="1.0" encoding="UTF-8"?>
<TypeInformation Load="true" AddinName="Web" 
                 PackageName="WebExtSample">
     <ClassInfo BaseClassInfoName="WebElement" 
                Name="WebExtBook" 
                DefaultOperationName="Select" >
         <IconInfo IconFile= "INSTALLDIR\dat\Extensibility\Web\Toolkits\WebExtSample\Res\WebBook.ico"/>
         <TypeInfo>
             <Operation ExposureLevel="CommonUsed" 
                        Name="Select" 
                        PropertyType="Method">
                 <Description>Selects the book.</Description>
                 <Documentation>
                     <![CDATA[Select the %l book.]]>
                 </Documentation>
             </Operation>
             <Operation ExposureLevel="CommonUsed" 
                        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" 
                           Direction="In" 
                           DynamicListOfValues="true">
                     <Type VariantType="String"/>
                     <Description>The author.</Description>
                 </Argument>
             </Operation>
             <Operation ExposureLevel="CommonUsed" 
                        Name="GoToUsedBooksPage" 
                        PropertyType="Method">
                 <Description>
                      Opens the UsedBooks page.
                 </Description>
                 <Documentation>
                      <![CDATA[Open the %l UsedBooks page.]]>
                 </Documentation>
             </Operation>
         </TypeInfo>
         <IdentificationProperties>
             <IdentificationProperty ForDefaultVerification="true" 
                                     ForVerification="true" 
                                     ForDescription="true" 
                                     Name="title"/>
             <IdentificationProperty ForDefaultVerification="true" 
                                     ForVerification="true" 
                                     ForDescription="true" 
                                     Name="authors"/>
             <IdentificationProperty ForDefaultVerification="true" 
                                     ForVerification="true"
                                     ForDescription="false" 
                                     Name="price"/>
             <IdentificationProperty ForDefaultVerification="true" 
                                     ForVerification="true" 
                                     ForDescription="false" 
                                     Name="min_used_price"/>
         </IdentificationProperties>
     </ClassInfo>
</TypeInformation>

Continue to Stage 3: Teaching UFT One to Identify, Spy, and Learn the Book Control.