Web Add-in Extensibility Developer Guide > Toolkit Configuration Schema > Elements > Identification\Browser Element

Identification\Browser Element

Description

A collection of Conditions elements to use when working with the specified browser.

Important Information

  • If the name attribute is set to *, the min_version attribute is ignored.
  • Top-level Conditions elements should be contained in a Browser element.

    If the same conditions are relevant for all supported browsers, define them within a single Browser element with the type attribute set to *

    Note: For backward compatibility, UFT also applies conditions to all browsers if the Conditions element is contained directly within the Identification element.

Attributes

Name Type Use Default Description
min_version string optional   The minimum browser version. The Conditions elements within this Browser element are used when working with browsers of the specified type, whose version is the same or later.

You can define different elements for different versions of the same browser. If more than one element matches the current browser, then the matching element with the latest version is used.

For example, if you define an internet explorer Browser element with min_version="5" and another with min_version="7", the former is used when running on Internet Explorer 6 and the latter is used when running on Internet Explorer 8.

name string required  

The type of browser.

Possible values:

  • internet explorer
  • Mozilla Firefox
  • Chrome 
  • *  - Any supported version of any of the above browsers, except those already specified in a specific Browser element.

Diagram

Browser Element (Optional, unlimited elements allowed) Sequence (Required, 1 element allowed) HTMLTags Element (Optional, up to 1 element(s) allowed) Sequence (Required, 1 element allowed) Tag Element (Required, 1 or more elements allowed)
Conditions Element (Optional, unlimited elements allowed) Sequence (Required, 1 element allowed) Condition Element (Optional, unlimited elements allowed)
Conditions Element (Optional, unlimited elements allowed)


Children

Used By

Source

<xs:element xmlns:xs="http://www.w3.org/2001/XMLSchema" name="Browser" minOccurs="0" maxOccurs="unbounded">
    <xs:annotation>
        <xs:documentation>A collection of Conditions elements to use when working with the specified browser.</xs:documentation>
    </xs:annotation>
    <xs:complexType>
        <xs:sequence>
            <xs:element ref="HTMLTags" minOccurs="0" />
            <xs:element ref="Conditions" minOccurs="0" maxOccurs="unbounded" />
        </xs:sequence>
        <xs:attribute name="name" use="required">
            <xs:annotation>
                <xs:documentation>The type of browser.</xs:documentation>
            </xs:annotation>
            <xs:simpleType>
                <xs:restriction base="xs:string">
                    <xs:enumeration value="internet explorer" />
                    <xs:enumeration value="Mozilla Firefox" />
                    <xs:enumeration value="Chrome" />
                    <xs:enumeration value="*" />
                </xs:restriction>
            </xs:simpleType>
        </xs:attribute>
        <xs:attribute name="min_version" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation>The browser version. The Conditions elements within this Browser element are used when working with browsers of the specified type, whose version is the same or later.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
    </xs:complexType>
</xs:element>