DropdownListHandle (install4j API)
Description: declaration: package: com.install4j.api.test.formcomponents, interface: DropdownListHandle

# Interface DropdownListHandle

All Superinterfaces:
  `FormComponentHandle`

public interface DropdownListHandle extends FormComponentHandle
Handle for the "Drop-down list" form component. The Swing widget is a non-editable `JComboBox`.

Reach this handle via `ScreenHandle.dropdownList()`.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `DropdownListHandle`
  `assertDisabled()`
  `DropdownListHandle`
  `assertEnabled()`
  `DropdownListHandle`
  `assertInvisible()`
  `DropdownListHandle`
  `assertSelectedItem(String expected)`
  Assert that the currently selected item equals the expected value.
  `DropdownListHandle`
  `assertVisible()`
  `List<String>`
  `getItems()`
  The items currently in the drop-down.
  `String`
  `getSelectedItem()`
  The currently selected item.
  `DropdownListHandle`
  `selectIndex(int index)`
  Select the item at the given index.
  `DropdownListHandle`
  `selectItem(String item)`
  Select the first item whose label equals the given value.

  ### Methods inherited from interface FormComponentHandle

  `getId, isEnabled, isVisible`

- ## Method Details

  - ### getItems

    @NotNull List<String> getItems()
    The items currently in the drop-down.

  - ### getSelectedItem

    @NotNull String getSelectedItem()
    The currently selected item.

  - ### selectItem

    @NotNull DropdownListHandle selectItem(@NotNull String item)
    Select the first item whose label equals the given value.

  - ### selectIndex

    @NotNull DropdownListHandle selectIndex(int index)
    Select the item at the given index.

  - ### assertSelectedItem

    @NotNull DropdownListHandle assertSelectedItem(@NotNull String expected)
    Assert that the currently selected item equals the expected value.

  - ### assertEnabled

    @NotNull DropdownListHandle assertEnabled()
    Specified by:
      `assertEnabled` in interface `FormComponentHandle`

  - ### assertDisabled

    @NotNull DropdownListHandle assertDisabled()
    Specified by:
      `assertDisabled` in interface `FormComponentHandle`

  - ### assertVisible

    @NotNull DropdownListHandle assertVisible()
    Specified by:
      `assertVisible` in interface `FormComponentHandle`

  - ### assertInvisible

    @NotNull DropdownListHandle assertInvisible()
    Specified by:
      `assertInvisible` in interface `FormComponentHandle`