MenuItem

StdWin. MenuItem

MenuItem

Constructor

A MenuItem object

Methods

waitUntilExists(timeout[opt]) → {Promise.<boolean>}

Waits until this test object exists or until the specified timeout elapses. This method is useful for synchronizing your test with your application.

Parameters:
NameTypeAttributesDescription
timeoutnumber <optional>
The time (in seconds) to wait for this object to exist.
By default, uses the object synchronization timeout defined in the runtime engine settings.
Returns:
a promise that is fulfilled with a boolean indicating whether the object exists.
Type
Promise.<boolean>

exists() → {Promise.<boolean>}

Checks if the menu item exists.
Returns:
a promise that is fulfilled with an indication of whether the menu item exists or not.
Type
Promise.<boolean>

hasSubMenu() → {Promise.<boolean>}

Checks if the menu item has sub-menus.
Returns:
a promise that is fulfilled with an indication of whether the menu item has sub-menus or not.
Type
Promise.<boolean>

index() → {Promise.<number>}

Gets the index of the menu item.
Returns:
a promise that is fulfilled with the index of the menu item.
Type
Promise.<number>

isChecked() → {Promise.<boolean>}

Checks if the menu item is checked.
Returns:
a promise that is fulfilled with an indication of whether the menu item is checked or not.
Type
Promise.<boolean>

isEnabled() → {Promise.<boolean>}

Checks if the menu item is enabled.
Returns:
a promise that is fulfilled with an indication of whether the menu item is enabled or not.
Type
Promise.<boolean>

label() → {Promise.<string>}

Gets the label of the menu item.
Returns:
a promise that is fulfilled with the label of the menu item.
Type
Promise.<string>
Gets the number of sub-menus of the menu item.
Returns:
a promise that is fulfilled with the number of sub-menus of the menu item.
Type
Promise.<number>