title: Protractor Iterate through ng-click
body: <p>I have a following code </p>
  
  <pre><code>&lt;div class="btn btn-success form-control ng-binding" ng-click="test(uid)"&gt;
                  First
              &lt;/div&gt;
      &lt;div class="btn btn-success form-control ng-binding" ng-click="test(uid)"&gt;
                  Second
              &lt;/div&gt;
  &lt;div class="btn btn-success form-control ng-binding" ng-click="test(uid)"&gt;
                  Third
              &lt;/div&gt;
  </code></pre>
  
  <p>How do i iterate elements based on ng-click to check for a specific text value(First or Second or Third) in Protractor?I  tried the following but i get undefined for uids.length. What is wrong here?</p>
  
  <pre><code>var uids = element.all(by.css('[ng-click="test(uid)"]'));
  for(var i=0;i&lt;uids.length;i++)
  console.log(uids.get(i).getText());
  </code></pre>