Get Toolkit State      

Description

Retrieves the state of the supported toolkit in the specified frame on the current Web page.

Syntax

function <get toolkit state> ( doc_element )

Argument

Type

Description

doc_element
Variant
The document element of the frame in which the toolkit's state needs to be checked.

Return Value

One of the following:

Remarks
Example

In this example, the toolkit support set enables UFT to query the state of the supported toolkit.

From the toolkit configuration file:

<Controls>

     <ToolkitStateQuery type="javascript"

        file_name="JavaScript\ToolkitState.js" function="get_toolkit_state" />    

</Controls>

During the recording session, UFT calls this function to find out if the toolkit is ready for event registration:

function get_toolkit_state (doc_element)

{

    if ( !window.jQuery )

    {

        return ToolkitState.NOT_PRESENT;

    } else if( window.jQuery.isReady )

            {

                return ToolkitState.READY;    

            } else

                    {

                        return ToolkitState.NOT_READY;    

                    }

}