docs: function searchBar_getElement(spec) {
      var elem = null;
  
      switch(spec.type) {
        /**
         * subtype: subtype to match
         * value: value to match
         */
        case "engine":
          // XXX: bug 555938 - Mozmill can't fetch the element via a lookup here.
          // That means we have to grab it temporarily by iterating through all childs.
          var popup = this.getElement({type: "searchBar_dropDownPopup"}).getNode();
          for (var ii = 0; ii < popup.childNodes.length; ii++) {
            var entry = popup.childNodes[ii];
            if (entry.getAttribute(spec.subtype) == spec.value) {
              elem = new elementslib.Elem(entry);
              break;
            }
          }
          //elem = new elementslib.Lookup(this._controller.window.document, SEARCH_POPUP +
          //                              '/anon({"' + spec.subtype + '":"' + spec.value + '"})');
          break;
        case "engine_manager":
          // XXX: bug 555938 - Mozmill can't fetch the element via a lookup here.
          // That means we have to grab it temporarily by iterating through all childs.
          var popup = this.getElement({type: "searchBar_dropDownPopup"}).getNode();
          for (var ii = popup.childNodes.length - 1; ii >= 0; ii--) {
            var entry = popup.childNodes[ii];
            if (entry.className == "open-engine-manager") {
              elem = new elementslib.Elem(entry);
              break;
            }
          }
          //elem = new elementslib.Lookup(this._controller.window.document, SEARCH_POPUP +
          //                              '/anon({"anonid":"open-engine-manager"})');
          break;
        case "searchBar":
          elem = new elementslib.Lookup(this._controller.window.document, SEARCH_BAR);
          break;
        case "searchBar_autoCompletePopup":
          elem = new elementslib.Lookup(this._controller.window.document, SEARCH_AUTOCOMPLETE);
          break;
        case "searchBar_contextMenu":
          elem = new elementslib.Lookup(this._controller.window.document, SEARCH_CONTEXT);
          break;
        case "searchBar_dropDown":
          elem = new elementslib.Lookup(this._controller.window.document, SEARCH_DROPDOWN);
          break;
        case "searchBar_dropDownPopup":
          elem = new elementslib.Lookup(this._controller.window.document, SEARCH_POPUP);
          break;
        case "searchBar_goButton":
          elem = new elementslib.Lookup(this._controller.window.document, SEARCH_GO_BUTTON);
          break;
        case "searchBar_input":
          elem = new elementslib.Lookup(this._controller.window.document, SEARCH_INPUT);
          break;
        case "searchBar_suggestions":
          elem = new elementslib.Lookup(this._controller.window.document, SEARCH_AUTOCOMPLETE +
                                        '/anon({"anonid":"tree"})');
           break;
        case "searchBar_textBox":
          elem = new elementslib.Lookup(this._controller.window.document, SEARCH_TEXTBOX);
          break;
        default:
          throw new Error(arguments.callee.name + ": Unknown element type - " + spec.type);
      }
  
      return elem;
    }