 <p>There are 3 types of javascript popups:</p> <ol> <li>Alert - it has only "yes" button</li> <li>Confirmation - it has "yes" as well as "no" buttons</li> <li>Prompt - it has input area to write something and "yes" and "no" buttons</li> </ol> <p>You need to make sure which type of popup is shown and act accordingly.</p>