Settings\Variable Element

Description

A single settings element.

Attributes

NameTypeUseDefaultDescription
namestringrequired 

The name of the setting.

Possible values:

  • default_imp_file - the default file from which the implementation functions are called. (The corresponding value attribute contains the name of the file.)
  • common_file - the file in which you store helper functions used for more than one test object class. (The corresponding value attribute contains the name of the file.) This variable is only relevant in a Settings element within a Controls element.
  • func_to_get_base_elem - the function that returns the Web element whose corresponding test object implements the properties and test object methods inherited from the base class and not implemented for this control. (The corresponding value attribute contains the name of the function.) This variable is only relevant in a Settings element within a Control element.
  • file_for_func_to_get_base_elem - the file that contains the function that returns the base element. If no file is specified, the default file is used. (The corresponding value attribute contains the name of the file.) This variable is only relevant in a Settings element within a Control element.
  • func_to_extract_data - the function that returns the items in a list object. This variable is only relevant in a List element.
  • cache scripts - Specifies whether to always use the JavaScript file that was injected into the Web page when it was opened. If this variable's value is set to false, the relevant JavaScript files are re-injected every time the Web page is refreshed. (The corresponding value attribute is set to true or false.)  This variable is relevant in a Settings element within a Controls element.
  • func_to_get_table_data - the function that returns the contents of a table object. (The corresponding value attribute is the function used to retri). This variable is only relevant in a Settings element within a Control element.
  • func_to_get_cell_elem - The function to retrieve data from a specified cell. The corresponding value attribute is the XXXX).
  • other supported types - Enables you to recognize an object even if its name or type was changed.
valuestringrequired The value for the setting.

Possible values:

  • If name = default_imp_file:
    The name of the default file from which the implementation functions are called.
  • If name = common_file:
    The name of the file in which you store helper functions used for more than one test object class.
  • If name = func_to_get_base_elem:
    The name of the function that returns the Web element whose corresponding test object implements the properties and test object methods inherited from the base class and not implemented for this control.
  • If name = func_to_extract_data: A json string in the following format:
    “{
    \“type\”:\”list\”,
    \“object_name\”:\”SAPGUICombobox_1\”,
    \“content\”:[value1, value2, value3, value4, value5]
    }”
  • If name = file_for_func_to_get_base_elem:
    The name of the file that contains the function that returns the base element. 
  • If name = cache scripts:
    true (default) - Inject JavaScript files into the Web page only when the page is opened.
    false - Re-inject JavaScript files into the Web page every time the page is refreshed.
  • If name = func_to_get_table_data:
    The name of the your function that returns the table data.
  • If name = func_to_get_cell_elem:
    The name of the your function that returns the data from the specified cell.
  • If name = other supported types: the previous names of the object. If there are more than one previous type, the types are separated by a semicolon (;).



Note: Setting this value to false is useful during the development stage, as it enables you to test changes that you make in your JavaScript functions without needing to close and reopen the Web page. When you finish developing, set this value back to true, to avoid performance degradation.

Used By

Source

<xs:element xmlns:xs="http://www.w3.org/2001/XMLSchema" name="Variable" minOccurs="0" maxOccurs="unbounded">
    <xs:annotation>
        <xs:documentation>A single settings element.</xs:documentation>
    </xs:annotation>
    <xs:complexType>
        <xs:attribute name="name" use="required">
            <xs:annotation>
                <xs:documentation>The name of the setting.</xs:documentation>
            </xs:annotation>
            <xs:simpleType>
                <xs:restriction base="xs:string">
                    <xs:enumeration value="default_imp_file" />
                    <xs:enumeration value="common_file" />
                    <xs:enumeration value="cache scripts" />
                    <xs:enumeration value="func_to_get_base_elem" />
                    <xs:enumeration value="file_for_func_to_get_base_elem" />
                    <xs:enumeration value="func_to_get_table_data" />
                    <xs:enumeration value="func_to_get_cell_elem" />
                    <xs:enumeration value="func_to_extract_data" />
                    <xs:enumeration value="other supported types" />
                </xs:restriction>
            </xs:simpleType>
        </xs:attribute>
        <xs:attribute name="value" type="xs:string" use="required">
            <xs:annotation>
                <xs:documentation>The value for the setting.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
    </xs:complexType>
</xs:element>