title: protractor how to get text from div?
body: <p>Trying to get the text inside my div:</p>
  
  <pre><code>&lt;div class="ng-scope ng-binding"&gt;
           Hello this is it!
  &lt;/div&gt;
  </code></pre>
  
  <p>In my jasmine script I have (using xpath):</p>
  
  <pre><code>var helloTxt=driver.findElement(by.xpath('//*[@id="top"]/div/div/div[3]/div[2]/div/div[1]/div[1]/div/div'));
  expect(helloTxt.getText()).toBe('Hello this is it!');
  </code></pre>
  
  <p>the code looks like this:</p>
  
  <pre><code>&lt;div class="container"&gt;
          &lt;div data-ng-repeat="message in getMessages() track by $index"&gt;
              {{message}}
          &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>How can I check get the messages in <code>{{message}}</code>?
  Is there another way to access this div without using xpath? Or how can I fix this?</p>