如何在角度量角器中取消选中所选复选框?
<div ng-init="frm.for_all_trades = true">
<input id="product-" class="css-checkbox ng-pristine ng-valid" type="checkbox" value="option1" ng-model="frm.for_all_trades" ng-checked="frm.for_all_trades" name="product_1" checked="checked">
<label class="css-label checkbox-label radGroup1" for="product-"> All </label>
</div>
我使用此代码,但这不起作用。找不到可点击元素时出错。
var chkbox = element(by.model('frm.for_all_trades'));
expect(chkbox.isSelected()).toBe(true); //this is working
chkbox.click(); //click method not worked
答案 0 :(得分:1)
在您的情况下 - 您的zIndex
checkbox
重叠