Introduction
Dialogs are popup windows that appear in your browser to ask for user confirmation or input. They can be triggered by JavaScript functions like:
window.confirm()
- Shows a confirmation dialog with OK/Cancel buttonswindow.prompt()
- Shows an input dialog where users can enter textwindow.alert()
- Shows an alert message with an OK button
How to handle dialogs in Magic Inspector
By default, Magic Inspector will automatically dismiss any dialog that appears during test execution. However, you can change this behavior for specific actions.
To configure how dialogs are handled:
- Open the options of the action that will trigger the dialog
- Look for the "On dialog" section
- Choose between "Accept" or "Dismiss" using the radio buttons
- Run your test normally
For dialog with prompt
Additionaly, you can use the "Optional prompted value" input (shown as 2 in the above figure) to enter a specific value for the prompt dialog. This field is optional.
Default behavior
By default, Magic Inspector will automatically dismiss any dialog that appears during test execution.