Protractor get element by model in repeater array
问题 For example, in HTML page: <tr ng-repeat="post in posts"> <td ng-click="activePost(post)" class="title">{{post.title}}</td> <td><button class="btn btn-danger" ng-click="delete(post)">Delete</button></td> <td><input type="checkbox" ng-model="post.active" id="{{post.id}}" /></td> </tr> Then, I want something like: element.all(by.repeater('post in posts')).then(function(posts) { var activePost = posts[0].element(by.model('active')); expect(activePost).toEqual(true); }); This returns an unable to