Stage 6: Changing the Name of the Test Object
In this section, you modify the toolkit support set to instruct OpenText Functional Testing to name the WebExtBook test object according to its title, as per your plan (Planning Support for the Book Sample Toolkit).
When OpenText Functional Testing creates the test object that represents a control, it calls the get_property_value function (used for retrieving test object identification property values) with the argument logical_name to determine the name for the test object. You can implement the get_property_value function accordingly, to customize the name OpenText Functional Testing gives the test object. If the get_property_value function does not support the logical_name property, the test object is given the name of the test object class (followed by an index, if there is more than one object of the same test object class on the same page).
To customize the name of the test object:
In the get_property_value function in the WebExtBook.js file, replace the lines:
if ( prop == "title" ) // For the "title" identification property,
with the lines:
if ( prop == "logical_name" || prop == "title" ) // For the "title" identification property, as well as // the "logical_name" property
Note: You can modify the WebExtBook.js file in the toolkit support set folder and then later deploy it to OpenText Functional Testing for testing, or you can modify <OpenText Functional Testing installdir>\dat\Extensibility\Web\Toolkits\WebExtSample\WebExtBook.js directly.
The get_property_value function now returns the same text for the logical_name property that OpenText Functional Testing uses to name the test object, as it does for the title identification property. (Modify the comment that explains this function accordingly. At the end of the comment, add the following: as well as the hard coded "logical_name" property that OpenText Functional Testing uses to name the test object.)

