Commands:Click dialog button

The click dialog button command allows for the pressing of any (usually javascript) dialog button that appears on the screen. Sometimes these will be in the form of warnings or alerts (ie – “You are now navigating away from Nationalcitybank.com. Please press OK to continue.”), and other times they will be to tell you that something has been done incorrectly…Perhaps you’ve forgotten to fill in a form field on an account creation page.

The command requires only one parameter – the text of the button that requires clicking. (This is not the window text, but the text of the button itself, usually something like “OK”.) The below script will visit an example page, bring up a dialog window, wait 5 seconds, and click it.