Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: dialog

[8:14] (extern: com.lehman.aussom.ADialog) extends: object

The dialog class wraps a browser dialog event (alert, confirm, prompt, or beforeunload). Instances are obtained via page.waitForDialog() or by registering an onDialog event handler on a page.

Methods

  • type ()

    Returns the dialog type string: 'alert', 'confirm', 'prompt', or 'beforeunload'.

    • @r A string dialog type.
  • message ()

    Returns the message text displayed in the dialog.

    • @r A string with the dialog message.
  • defaultValue ()

    Returns the default value for prompt dialogs. Returns an empty string for alert and confirm dialogs.

    • @r A string default value.
  • accept (string PromptText = "")

    Accepts the dialog. For prompt dialogs the optional text is used as the input value; if empty the default value is used.

    • @p PromptText is an optional string value to enter into a prompt dialog.
    • @r This object.
  • dismiss ()

    Dismisses the dialog (equivalent to clicking Cancel).

    • @r This object.