After using the CloseApplication action, click the button in the prompt preventing the browser from closing (just a user would need to). Note, this could be implemented as a popup watcher if you cannot predict when message box occurs.