Protractor: Failed: row.findElement is not a function

Viewed 2329

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

1 Answers
Related