I have list of elements:
 <li ng-repeat="list in lists track by $index">
                    <a href="" ng-click="doSomething($index)">{{list.name}}</a>
                    <button class="destroy" ng-click="remove(list)"></button>
                </li>
I am trying to click the last button.
it('test', function () {
    var row = element.all(by.repeater('list in lists track by $index')).last();
    row.findElement(by.tagName('button')).click();
});
but I get
Message: Failed: row.findElement is not a function
Use element() instead:
row.element(by.tagName('button')).click();
                        If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With