docs: function addonsManager_getElements(aSpec) {
      var spec = aSpec || { };
      var type = spec.type;
      var subtype = spec.subtype;
      var value = spec.value;
      var parent = spec.parent;
  
      var root = parent ? parent.getNode() : this._controller.tabs.activeTab;
      var nodeCollector = new domUtils.nodeCollector(root);
  
      switch (type) {
        // Add-ons
        case "addons":
          nodeCollector.queryNodes(".addon").filterByDOMProperty(subtype, value);
          break;
        case "addonsList":
          nodeCollector.queryNodes("#addon-list");
          break;
        // Categories
        case "categoriesList":
          nodeCollector.queryNodes("#categories");
          break;
        case "categories":
          nodeCollector.queryNodes(".category").filterByDOMProperty(subtype, value);
          break;
        // Detail view
        case "detailView_element":
          nodeCollector.queryNodes(value);
          break;
        case "detailView_disableButton":
          nodeCollector.queryNodes("#detail-disable");
          break;
        case "detailView_enableButton":
          nodeCollector.queryNodes("#detail-enable");
          break;
        case "detailView_installButton":
          nodeCollector.queryNodes("#detail-install");
          break;
        case "detailView_preferencesButton":
          nodeCollector.queryNodes("#detail-prefs");
          break;
        case "detailView_removeButton":
          nodeCollector.queryNodes("#detail-uninstall");
          break;
        case "detailView_findUpdatesLink":
          nodeCollector.queryNodes("#detail-findUpdates");
          break;
        // Bug 599771 - button-link's are missing id or anonid
        //case "detailView_restartLink":
        //  nodeCollector.queryNodes("#detail-restart");
        //  break;
        case "detailView_undoLink":
          nodeCollector.queryNodes("#detail-undo");
          break;
        case "detailView_findUpdatesRadiogroup":
          nodeCollector.queryNodes("#detail-findUpdates");
          break;
        // List view
        case "listView_element":
          nodeCollector.queryAnonymousNodes(subtype, value);
          break;
        case "listView_disableButton":
          nodeCollector.queryAnonymousNodes("anonid", "disable-btn");
          break;
        case "listView_enableButton":
          nodeCollector.queryAnonymousNodes("anonid", "enable-btn");
          break;
        case "listView_installButton":
          // There is another binding we will have to skip
          nodeCollector.queryAnonymousNodes("anonid", "install-status");
          nodeCollector.root = nodeCollector.nodes[0];
          nodeCollector.queryAnonymousNodes("anonid", "install-remote");
          break;
        case "listView_preferencesButton":
          nodeCollector.queryAnonymousNodes("anonid", "preferences-btn");
          break;
        case "listView_removeButton":
          nodeCollector.queryAnonymousNodes("anonid", "remove-btn");
          break;
        case "listView_moreLink":
          // Bug 599771 - button-link's are missing id or anonid
          nodeCollector.queryAnonymousNodes("class", "details button-link");
          break;
        // Bug 599771 - button-link's are missing id or anonid
        //case "listView_restartLink":
        //  nodeCollector.queryAnonymousNodes("anonid", "restart");
        //  break;
        case "listView_undoLink":
          nodeCollector.queryAnonymousNodes("anonid", "undo");
          break;
        case "listView_cancelDownload":
          // There is another binding we will have to skip
          nodeCollector.queryAnonymousNodes("anonid", "install-status");
          nodeCollector.root = nodeCollector.nodes[0];
          nodeCollector.queryAnonymousNodes("anonid", "cancel");
          break;
        case "listView_pauseDownload":
          // There is another binding we will have to skip
          nodeCollector.queryAnonymousNodes("anonid", "install-status");
          nodeCollector.root = nodeCollector.nodes[0];
          nodeCollector.queryAnonymousNodes("anonid", "pause");
          break;
        case "listView_progressDownload":
          // There is another binding we will have to skip
          nodeCollector.queryAnonymousNodes("anonid", "install-status");
          nodeCollector.root = nodeCollector.nodes[0];
          nodeCollector.queryAnonymousNodes("anonid", "progress");
          break;
        // Search
        // Bug 599775 - Controller needs to handle radio groups correctly
        // Means for now we have to use the radio buttons
        case "search_filterRadioButtons":
          nodeCollector.queryNodes(".search-filter-radio").filterByDOMProperty(subtype, value);
          break;
        case "search_filterRadioGroup":
          nodeCollector.queryNodes("#search-filter-radiogroup");
          break;
        case "search_textbox":
          nodeCollector.queryNodes("#header-search");
          break;
        case "search_throbber":
          nodeCollector.queryNodes("#header-searching");
          break;
        // Utils
        case "utilsButton":
          nodeCollector.queryNodes("#header-utils-btn");
          break;
        case "utilsButton_menu":
          nodeCollector.queryNodes("#utils-menu");
          break;
        case "utilsButton_menuItem":
          nodeCollector.queryNodes(value);
          break;
        // Views
        case "viewDeck":
          nodeCollector.queryNodes("#view-port");
          break;
        case "views":
          nodeCollector.queryNodes(".view-pane").filterByDOMProperty(subtype, value);
          break;
        default:
          throw new Error(arguments.callee.name + ": Unknown element type - " + spec.type);
      }
  
      return nodeCollector.elements;
    }