Stage 4: Define the WebExtBook's list of operations and identification properties
In this section, you complete the definition of your test object class by specifying the operations (methods) and identification properties you want to be available for WebExtBook test objects. These definitions are stored in the test object configuration file (WebExtSampleTestObjects.xml).
In later stages, you will add the JavaScript implementation necessary to supports these operations and properties.
Open the Operations tab of the test object class designer
Select the Operations tab on the left side of the WebExtBook test object class designer.
Add the Select and GoToUsedBooksPage operations
In the Operations toolbar, click Add
.A new operation, named Operation1 is added to the list of operations, and selected.
In the Name box, enter
GoToUsedBooksPage.In the Description box, enter
Opens the UsedBooks page.Repeat the steps above to add an operation named
Select, with the descriptionSelects the book.Select the Default operation check box (for the Select operation).
Click Save.
View the remaining options in this tab to learn what is available. For details, see Operations tab (Test Object Class designer).
The Select and GoToUsedBooksPage operations do not receive any arguments or return a value. Therefore, you do not need to make any additional changes.
Add the GoToAuthorPage operation
Add a new operation, named
GoToAuthorPage, with the descriptionOpens the Web page for the specified author.In the Operation Arguments toolbar, click Add
. In the Name column in the Operation Arguments table, enter
AuthorName.Clear the check box in the Optional column, because this is a mandatory argument.
In the Description column, enter
The author.Accept the default values in the Direction and Type columns. These indicate that this is a string value passed to the operation.
Click Save.
View the new test object class in the Class View
Click the Class View tab beneath the Project Explorer to open the Class View:

The WebExtBook test object class and the icon you specified for it are displayed in the list of test object classes. The operations that you defined are displayed in the list of operations.
Open the Properties tab of the test object class designer
Select the Properties tab (Test Object Class designer).
Specify the properties to inherit from WebElement
Select the html tag property and click Inherit From Base Class in the Properties toolbar.
Do the same thing for the html id property.
Add the properties: title, authors, price, min_used_price
In the Properties toolbar, click Add
.A new property, named Property1, is added to the list of properties and selected.
Click on the property name and enter
title.Add additional properties named
authors,price, andmin_used_price.
Add the properties to the relevant groups
The lists of properties on the right side of this tab specify the functionalities for which the properties are used.
Select the Object Identification - Mandatory group.
Properties in this group are used for the test object description. (The test object description is a set of properties used to uniquely identify a specific test object.)
html tag and html id were added to this group automatically.
Double-click on the properties
titleandauthorsto add them to the group.Select the Checkpoints and Output Values group.
Properties in this group are made available to use in checkpoints and output values.
Double-click each of the properties that you created to add them to this group.
The check box for each of the properties you add is selected by default. This indicates the properties should be selected by default when creating checkpoints and output values.
Select the Object Spy group.
Properties in this group are made available in the Object Spy. All of the properties were added to this group by default.
View the changes
View the changes that Extensibility Accelerator made in the test object configuration file.
Open the Project Viewer and double-click the WebExtSampleTestObjects.xml file. In the file, you can see that the operations and identification properties of the WebExtBook test object class are now defined according to the details described in the Web Add-in Extensibility planning checklist.
The operations are defined, with their descriptions, and, where relevant, their arguments. The Select operation is specified as the default operation for the test object class. The properties are defined, with XML attributes indicating the groups to which they belong:
<ClassInfo DefaultOperationName="Select" GenericTypeID="Object" Name="WebExtBook" BaseClassInfoName="WebElement"> <Description>The test object class used to represent a Book control. </Description> <HelpInfo /> <IconInfo IconFile="INSTALLDIR\Dat\Extensibility\Web\Toolkits\WebExtSample\Res\WebBook.ico" IconIndex="0" /> <TypeInfo> <Operation Name="GoToAuthorPage" PropertyType="Method"> <Description>Opens the Web page for the specified author.</Description> <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> </Operation> <Operation Name="Select" PropertyType="Method"> <Description>Selects the book.</Description> </Operation> </TypeInfo> <IdentificationProperties> <IdentificationProperty Name="authors" ForVerification="true" ForDefaultVerification="true" /> <IdentificationProperty Name="min_used_price" ForVerification="true" ForDefaultVerification="true" /> <IdentificationProperty Name="price" ForVerification="true" ForDefaultVerification="true" /> <IdentificationProperty Name="title" ForVerification="true" ForDefaultVerification="true" /> </IdentificationProperties> </ClassInfo>
For details on the structure and content of the test object configuration file, see the Test Object Schema Help.
Continue to Deploy the project and test your toolkit support set.

