JSLibrariesToInject\JSLibrary Element

Description

Specifies the location of a JavaScript library to inject into the target Web page.

Important Information

  • Specify the location of any external JavaScript library whose functions you call in the JavaScript support functions that you design.
  • When UFT is open with your toolkit support set loaded, UFT injects this library into every Web page that opens in a browser.

Attributes

NameTypeUseDefaultDescription
pathstringrequired The file system path to the library (a .js file).

You can specify a file path relative to the UFT installation folder, by providing a file path that begins with the string INSTALLDIR, where INSTALLDIR replaces the UFT installation folder path.

If you do not provide a full file system path or use the INSTALLDIR string, then UFT searches for the specified file path under <UFT installation folder>\dat\Extensibility\Web\Toolkits\<Toolkit name> folder.

Used By

Source

<xs:element xmlns:xs="http://www.w3.org/2001/XMLSchema" name="JSLibrary" minOccurs="0" maxOccurs="unbounded">
    <xs:annotation>
        <xs:documentation>Specifies the location of a JavaScript library to inject into the target Web page.</xs:documentation>
    </xs:annotation>
    <xs:complexType>
        <xs:attribute name="path" type="xs:string" use="required">
            <xs:annotation>
                <xs:documentation>The file system path to the library.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
    </xs:complexType>
</xs:element>