AlertHandle (install4j API)
Description: declaration: package: com.install4j.api.test.ui, interface: AlertHandle

# Interface AlertHandle

All Superinterfaces:
  `DialogHandle, UiContainer`

public interface AlertHandle extends DialogHandle
A `JOptionPane`-built modal alert. Carries an icon type for info, warning, error or question, and exposes OK / Cancel / Yes / No clicks.

Reach this handle via `Session.alert()`.

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Interface
  Description
  `static enum`
  `AlertHandle.IconType`
  The icon shown by the alert, matching `JOptionPane`'s message-type constants.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `clickCancel()`
  Click a button labeled or named "Cancel".
  `void`
  `clickNo()`
  Click a button labeled or named "No".
  `void`
  `clickOk()`
  Click a button labeled or named "OK".
  `void`
  `clickYes()`
  Click a button labeled or named "Yes".
  `AlertHandle.IconType`
  `getIconType()`
  The configured icon type.
  `String`
  `getMessageText()`
  The alert's message text.

  ### Methods inherited from interface DialogHandle

  `clickWindowClose, getTitle`

  ### Methods inherited from interface UiContainer

  `dumpAsString, saveScreenshot`

- ## Method Details

  - ### getMessageText

    @NotNull String getMessageText()
    The alert's message text.

  - ### getIconType

    @NotNull AlertHandle.IconType getIconType()
    The configured icon type.

  - ### clickOk

    void clickOk()
    Click a button labeled or named "OK".

  - ### clickCancel

    void clickCancel()
    Click a button labeled or named "Cancel".

  - ### clickYes

    void clickYes()
    Click a button labeled or named "Yes".

  - ### clickNo

    void clickNo()
    Click a button labeled or named "No".