Share this page

# ToolBarButton

## Java. ToolBarButton

ToolBarButton

## Constructor

## new ToolBarButton()

A ToolBarButton object

# Methods

## index() → {Promise.<number>}

The 1-based index number of the toolbar button. The index does not include hidden and separator buttons.

##### Returns:

a promise that is fulfilled with the index value of the toolbar button.

Type
  Promise.<number>

## isEnabled() → {Promise.<boolean>}

Indicates whether the toolbar button accepts user input.

##### Returns:

a promise that is fulfilled with a boolean value indicating if the toolbar button is enabled.

Type
  Promise.<boolean>

## isSelected() → {Promise.<boolean>}

Indicates whether the toolbar button is either pressed or checked. Remarks: A button is pressed if it is being clicked; checked if it is a toggle button that is selected.

##### Returns:

a promise that is fulfilled with a boolean value indicating if the toolbar button is selected.

Type
  Promise.<boolean>

## name() → {Promise.<string>}

The name of the toolbar button.

##### Returns:

a promise that is fulfilled with the name of the toolbar button.

Type
  Promise.<string>

## press() → {Promise.<void>}

Presses this toolbar button.

##### Returns:

a promise that is fulfilled when the press operation ends.

Type
  Promise.<void>

## showDropdown() → {Promise.<void>}

Opens the dropdown menu associated with this toolbar button by clicking the arrow part of the button.

##### Returns:

a promise that is fulfilled when the showDropdown operation ends.

Type
  Promise.<void>

Tips to improve your search results... UFT Developer JavaScript SDK Reference Version 15.0-15.0.2 UFT Developer SDK Reference All View Local Help Center View Online Help Center back Go back in browser history forward Go forward in browser history Remove search highlights next topic Go to next topic previous topic Go to previous topic Print the current topic Version: