class: dialog
[24: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
Astring dialog type.
- @r
-
message ()
Returns the message text displayed in the dialog.
- @r
Astring with the dialog message.
- @r
-
defaultValue ()
Returns the default value for prompt dialogs. Returns an empty string for alert and confirm dialogs.
- @r
Astring default value.
- @r
-
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
PromptTextis an optional string value to enter into a prompt dialog. - @r
Thisobject.
- @p
-
dismiss ()
Dismisses the dialog (equivalent to clicking Cancel).
- @r
Thisobject.
- @r