Stage 4: Implementing Support for the WebExtUsedBooks Identification Properties and the Test Object Name

In the WebExtUsedBooks.js file, implement the get_property_value as follows:

function get_property_value(prop)
// The function provides values for all of the identification 
// properties defined in the test object configuration XML file, as 
// well as the hard coded "logical_name" property that UFT One 
// uses to name the test object.
{
    if ( prop == "logical_name" || prop == "title" )
    // For the "title" identification property, as well as the
    // "logical_name" property, return the inner text of the 
    // first cell in the first row
    {
        return GetTableElem().rows[0].cells[0].innerText;
    }
}

This function returns the title of the object for the title property, as well as for the test object name.

Note: You can modify the WebExtUsedBooks.js file in the toolkit support set folder and then later deploy it to UFT One for testing, or you can modify <UFT One installation folder>\dat\Extensibility\Web\Toolkits\WebExtSample\WebExtUsedBooks.js directly.

To complete this stage, perform the procedures in Deploying and Testing the Toolkit Support Set (for Stage 4).