docs: function(elementArrayFinder) {
      if (!elementArrayFinder) {
        throw new Error('BUG: elementArrayFinder cannot be empty');
      }
      this.parentElementArrayFinder = elementArrayFinder;
  
      // This filter verifies that there is only 1 element returned by the 
      // elementArrayFinder. It will warn if there are more than 1 element and
      // throw an error if there are no elements.
      var getWebElements = function() {
        return elementArrayFinder.getWebElements().then(function(webElements) {
          if (webElements.length === 0) {
            throw new webdriver.error.Error(
                webdriver.error.ErrorCode.NO_SUCH_ELEMENT,
                'No element found using locator: ' +
                    elementArrayFinder.locator_.toString());
          } else {
            if (webElements.length > 1) {
              console.log('warning: more than one element found for locator ' +
                  elementArrayFinder.locator_.toString() +
                  ' - you may need to be more specific');
            }
            return [webElements[0]];
          }
        });
      };
  
      // Store a copy of the underlying elementArrayFinder, but with the more
      // restrictive getWebElements (which checks that there is only 1 element).
      this.elementArrayFinder_ = new ElementArrayFinder(
          getWebElements, elementArrayFinder.locator_,
          elementArrayFinder.actionResults_);
  
      // Decorate ElementFinder with webdriver functions. Simply calls the
      // underlying elementArrayFinder to perform these functions.
      var self = this;
      WEB_ELEMENT_FUNCTIONS.forEach(function(fnName) {
        self[fnName] = function() {
          return self.elementArrayFinder_[fnName].
              apply(self.elementArrayFinder_, arguments).toElementFinder_();
        };
      });
    }