Get Property Value      

Description

Returns the value of the specified property.

Syntax

function get_property_value(property)

Argument

Type

Description

property
String
The name of the property.

Return Value

The value of the specified property. If not found, returns nothing.

Remarks
  • Implementing this function is mandatory. The minimum implementation returns the logical_name property.
  • This function provides values for the identification properties defined in a test object configuration file as well as the logical_name property that UFT uses to name the test object. If the function does not return a value, UFT uses the inherited or default implementation for the property.
  • The default function name is get_property_value. You can specify a different function name in the toolkit configuration file. For example:
  • <Control>

        <Run>

            <Properties type="javascript" function="get_myproperty_value"/>

        </Run>

    </Control>

Example

This example returns the text in the first cell of the table as the value of properties logical_name or title.

function get_property_value(property)

{

    if ( property == "logical_name" || property == "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;

    }

}