title: how to select child element in my test case
body: <p>I am trying to test a click event for my html</p>
  
  <p>html </p>
  
  <pre><code>&lt;div class="testGroup"&gt;
      &lt;div ng-repeat="test in tests"&gt;
          &lt;a ng-click="clickMe(test.id)"&gt;{{test.name}}&lt;/a&gt;
          &lt;a ng-click="clickMe(test.id)"&gt;{{test.name}}&lt;/a&gt;
          &lt;a ng-click="clickMe(test.id)"&gt;{{test.name}}&lt;/a&gt;
          &lt;a ng-click="clickMe(test.id)"&gt;{{test.name}}&lt;/a&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="testGroup"&gt;
      &lt;div ng-repeat="test in tests"&gt;
          &lt;a ng-click="clickMe(test.id)"&gt;{{test.name}}&lt;/a&gt;
          &lt;a ng-click="clickMe(test.id)"&gt;{{test.name}}&lt;/a&gt;
          &lt;a ng-click="clickMe(test.id)"&gt;{{test.name}}&lt;/a&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="testGroup"&gt;
      &lt;div ng-repeat="test in tests"&gt;
          &lt;a ng-click="clickMe(test.id)"&gt;{{test.name}}&lt;/a&gt;
          &lt;a ng-click="clickMe(test.id)"&gt;{{test.name}}&lt;/a&gt;
          &lt;a ng-click="clickMe(test.id)"&gt;{{test.name}}&lt;/a&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Three divs are identical but I want to select the first testGroup class and click the first a tag. I also want to click the first a tag on the second testGroup class.</p>
  
  <p>In my spec.js</p>
  
  <pre><code>element.all(by.css('.testGroup')).get(0).then(function(elem) {
      element(by.repeater('test in tests').row(0)).click();
  });
  </code></pre>
  
  <p>I am getting undefined is not a function error. I think it's because the get(0) is not a promise. How do I trigger click on the first a tag in the first testGroup div and first a tag in second testGroup div? Thanks for the help.</p>