assertAlert, assertConfirmation, assertPrompt
assertAlert (text), assertConfirmation (text), assertPrompt (text)
In the classic Firefox Selenium IDE there are also the corresponding "verify" versions verifyAlert, verifyConfirmation, verifyPrompt. Kantu for Chrome implementation of the Selenium IDE does not support these three commands - as they are no longer needed. The reason is that while in the Firefox IDE the verifyAlert (etc) commands are useful if a dialog box randomly appears and you just want to close it. Kantu for Chrome closes dialog boxes by default, unless you tell it otherwise. The reason for this behavior is that in 99% of all automation cases it seems users just want to close dialog boxes and move on. So there should be no need for the "verify..." versions of this command. But if you need them, let us know.
assertAlert, assertConfirmation, assertPrompt Example
The macro below first opens a prompt, and then Kantu IDE closes it automatically. The assertPrompt command is completely optional, and only needed if you want to assert that the dialog did appear and had the correct title.
|assertPrompt||Enter some text!||-|
Related Demo Macros
The ready-to-import-and-run source code of all demo macros can be found in the Github repository testmacros folder.
Anything wrong or missing on this page? Suggestions?
...then please contact us.