如何在量角器中单击ng-repeat下的元素

时间:2015-02-21 13:55:16

标签: javascript angularjs protractor

我想点击重复下方的复选框,我也尝试了代码,但它不适用于我 -

element.all(by.repeater('(spid in spids')).then(function(completeColumns) {
completeColumns[1].click();}); 

<div class="ng-scope" ng-repeat="spid in spids"><input class="ng-pristine ng- valid" type="checkbox" ng-model="spid.isSelected"/ <spanclass="ngbinding"style="padding-left: 10%; font-weight:normal;">wewe</span> </div>

<div class="ng-scope" ng-repeat`<div class="ng-scope" ng-repeat`="spid in spids"><input class="ng-pristine ng-valid" type="checkbox" ng-model="spid.isSelected"/><span class="ng-binding" style="padding-left: 10%; font weight:normal;">xyz</span></div>

1 个答案:

答案 0 :(得分:2)

试试element(by.model('spid.isSelected'))。它应该工作。