Cannot Call JavaScript When Alert/Confirm Active

You can’t execute code that uses JavaScript (e.g. WebUI.executeJavaScript) WHILE an alert/confirm is active. This is probably true for any browser-controlled dialog.

makeAlertAppearHere()

// You CANNOT call JavaScript here!

WebUI.acceptAlert()

// You CAN call JavaScript here

#JustSayin