<item>

The <item> element is contained by the <menu> element, which in turn can be contained by a <menu-expect> or <menu-select> element. When the ancestor element is a <menu-expect> the <item> element specifies the expected state and value of the menu item identified by the <menu> element. When the ancestor is a <menu-select> the <item> element specifies the menu item to be selected. For both use cases the contents of the <item> element is the name of the menu item.

When the ancestor of the <item> element is a <menu-expect> the <item> element includes attributes to specify the expected state and other information about the named menu item. These include the enabled/disabled state and whether or not the menu item is checked (selected). These attributes are ignored when the ancestor element is a <menu-select>.

In a <menu-expect> context, if the expected state of the menu item does not match the attributes of the <item> attribute a script error is thrown. In a <menu-select> context if the menu item cannot be selected a script error is thrown

Structure

Contains:
  • Text - The name of the menu item to be acted on.
Contained By:
  • <menu-select>
  • <menu-expect>
Attributes
Name Description Data Type Default Value Required
checked This attribute is only valid when the ancestor element is a <menu-expect> This is a Boolean attribute. The value t is true and indicates the menu item is expected to be checked. The value f is false and indicates the menu item is not expected to be checked. Boolean None No
enabled This attribute is only valid when the ancestor element is a <menu-expect>. This is a Boolean attribute. The value t is true and indicates the menu item is expected to be enabled. The value f is false and indicates the menu item is expected to be disabled.