title: protractor ElementArrayFinder .last() [object Object] has no method 'indexof'
body: <p>i'm trying to run through the tutorial  <a href="http://angular.github.io/protractor/#/tutorial" rel="nofollow">http://angular.github.io/protractor/#/tutorial</a> </p>
  
  <p>when i try to get element using <code>.first()</code> or <code>.last()</code> method
  the test failed with error:</p>
  
  <blockquote>
    <p>TypeError Object [object Object] has no method 'indexof'</p>
  </blockquote>
  
  <p>here is spec.js</p>
  
  <pre><code>var firstNumber = element(by.model('first'));
  var secondNumber = element(by.model('second'));
  var go = element(by.id('gobutton'));
  var latest = element(by.binding('latest'));
  var history = element.all(by.repeater('result in memory'));
  
  beforeEach(function() {
      browser.get('http://juliemr.github.io/protractor-demo/');
  });
  //...other tests passed
  
  it('should have a history', function(){
      firstNumber.sendKeys(1);
      secondNumber.sendKeys(2);
      go.click();
  
      expect(history.count()).toEqual(1);
      // expect(history.last()).toContain('1 + 2'); //error here
  
      firstNumber.sendKeys(3);
      secondNumber.sendKeys(5);
      go.click();
  
      expect(history.count()).toEqual(2);
      // expect(history.first()).toContain('3 + 5'); //and here
  });
  </code></pre>
  
  <p>regarding to this <a href="http://angular.github.io/protractor/#/api?view=ElementArrayFinder.prototype.first" rel="nofollow">ElementArrayFinder API</a> it should be run fine</p>
  
  <p>i'm using </p>
  
  <ul>
  <li>jasmine-1.3.1 </li>
  <li>protractor version 1.8.0</li>
  </ul>