The <field-expect> element allows for the validation of a detail screen field’s value and state. State information includes hidden or visible, and enabled or disabled. The contents of the field that can be validated include its current value, for duration fields the current value of each portion of the duration value (hours, minutes, seconds), for list fields the total number of rows in a list, or the current value of a row or rows within a list. When validating the value of a field, the validation attribute should be set indicating the type of validation. To validate multiple facets of a field, such as current value and enabled or disabled, multiple <field-expect> elements are required to validate each facet. To validate the value of multiple rows within a list, the <field-expect> element must contain on <row> element for each row to be validated. Note that only drop down lists may be validated by this element. For list view or list tile view fields, the <list-expect> element must be used. If the field does not match the expected criteria as specified by the <field-expect> element, a script error is thrown.
Name | Description | Data Type | Default Value | Required |
---|---|---|---|---|
type | This attribute specifies what is being checked
for within the field by this element. Valid values include:
|
string | string | No |
special | This attribute specifies that the field’s value should or should not be equal to its defined special value. The value t is true and the field is expected to be set to its special value. The value f is false. | string | f | No |
part | This attribute is valid only when checking
a duration field. It specifies the portion of the duration value
to be checked. Valid values for this attribute include:
|
string | none | Required for duration field edit types. Otherwise ignored. |
row | The row index to be checked by the element when the field is a drop down list. This index is 0-based, meaning the first row in the list is at position 0. This attribute is only valid when the edit type of the field is Complex Table Drop Down, Data Table Selection, or List Selection. If the <field-expect> contains one or more <row> elements, the first row checked is indicated by this attribute. Additional <row> elements are expected to be contained in the list in the order in which their corresponding <row> elements are contained in the <field-expect>. | non-negative integer | none | Required for drop down list fields. Otherwise ignored. |
count | This attribute specifies the expected number of rows in the list. | non-negative integer | none | No |
common field attributes | This element contains the following common
field attributes:
|
N/A | N/A | N/A |
common script attributes | A set of related attributes common to most elements within the Agentry Test Script. | N/A | N/A | N/A |