Clicking elements in a loop in protractor
<p>This is what I am trying to do - I am trying to click on an element with a locator and on clicking that element, 2 more links are displayed. I want to individually click on those 2 links and then do an assertion.</p>

<p>However, the code clicks first element and then stops. This is my code -</p>

<pre><code>self.expandHierarchy = function() {
var hrchy = element.all(by.css('.ng-binding.CanExpand'));
hrchy.each(function (elem) {
elem.click();
});
};
</code></pre>

<p>How can I do the same through protractor? All the elements have the same locator.</p>