【发布时间】:2015-11-01 15:14:18
【问题描述】:
HTML 代码
<div class="check-box-panel">
<!--
ngRepeat: employee in employees
-->
<div class="ng-scope" ng-repeat="employee in employees">
<div class="action-checkbox ng-binding">
<input id="John" type="checkbox" ng-click="toggleSelection(employee.name)"
ng-checked="selection.indexOf(employee.name) > -1" value="John"></input>
<label for="John">
::before
</label>
<!--
John
end ngRepeat: employee in employees
-->
<div class="ng-scope" ng-repeat="employee in employees">
<div class="action-checkbox ng-binding">
<input id="Jessie" type="checkbox" ng-click="toggleSelection(employee.name)"
ng-checked="selection.indexOf(employee.name) > -1" value="Jessie"></input>
<label for="Jessie"></label>
我尝试过使用 jQuery
element(by.repeater('employee in employees')).element(by.id('Jessie')).click();
另外,我尝试使用 css
element(by.repeater('employee in employees')).$('[value="Jessie"]').click();
但它没有完成这项工作。我可以通过其他方式点击特定的复选框吗?
【问题讨论】:
标签: javascript css angularjs protractor