function modalDialog_waitForDialog(aTimeout) {
    var timeout = aTimeout || TIMEOUT_MODAL_DIALOG;

    if (!this._observer) {
      return;
    }

    try {
      mozmill.utils.waitFor(function () {
        return this.finished;
      }, "Modal dialog has been found and processed", timeout, undefined, this);

      // Forward the raised exception so we can detect failures in modal dialogs
      if (this._observer.exception) {
        throw this._observer.exception;
      }
    }
    finally {
      this.stop();
    }
  }
function modalDialog_waitForDialog(aTimeout) {
    var timeout = aTimeout || TIMEOUT_MODAL_DIALOG;

    if (!this._observer) {
      return;
    }

    try {
      mozmill.utils.waitFor(function () {
        return this.finished;
      }, "Modal dialog has been found and processed", timeout, undefined, this);

      // Forward the raised exception so we can detect failures in modal dialogs
      if (this._observer.exception) {
        throw this._observer.exception;
      }
    }
    finally {
      this.stop();
    }
  }
function modalDialog_waitForDialog ( aTimeout ) { var timeout = aTimeout || TIMEOUT_MODAL_DIALOG ; if ( ! this . _observer ) { return ; } try { mozmill . utils . waitFor ( function ( ) { return this . finished ; } , "Modal dialog has been found and processed" , timeout , undefined , this ) ; // Forward the raised exception so we can detect failures in modal dialogs if ( this . _observer . exception ) { throw this . _observer . exception ; } } finally { this . stop ( ) ; } }
Wait until the modal dialog has been processed.

@param {Number} aTimeout (optional - default 5s)
Duration to wait
Wait until the modal dialog has been processed .
Wait for a modal dialog to be processed