I.seeAlert

Assert the message displayed on the alert.

Usage

I.seeAlert(text)
Parameter Type Remarks
text string Optional If given, checks that the expected text is showned on the alert

Example

UI.execute("alert('hello    jane')") // Opens an alert with the message "hello jane"
I.seeAlert() // Asserts that there is an alert. This passes.
I.seeAlert("hello jane") // Asserts that the alert message is "hello". This passes.
I.seeAlert("hello guest") // This fails.