테스트에서 먼저 특정 제품을 찾아서 해당 제품의 일부 하위 요소에 대한 작업을 수행해야합니다. 많은 제품이 있습니다.각도기 : 요소의 요소를 찾을 수 없습니다.
이것은 내 첫 번째 분도기 스크립트이므로 나와 함께 곰.
var prod = element.all(by.css('singleproduct')).get(1);
singleproduct
은 지침입니다. 이 중단 스크립트의 일부입니다
<singleproduct ng-repeat="item in vm.products" item="::item" class="col-xs-12 col-sm-6 col-md-4 product_tile ng-scope ng-isolate-scope">
<article ng-class="{'product--active': isSelected}" class="product">
<section ng-click="toggleDetails()" class="product-content">
<!-- some prod info -->
</section>
<section>
<div class="product-ordering">
<ul class="product-quantities">
<!-- ngRepeat: option in ::priceList -->
<li ng-repeat="option in ::priceList" class="ng-scope">
<!-- this is the LI I want to catch...
</li>
<!-- end ngRepeat: option in ::priceList -->
<li ng-repeat="option in ::priceList" class="ng-scope">
<!-- this is the LI I want to catch...
</li>
<!-- end ngRepeat: option in ::priceList -->
<li ng-repeat="option in ::priceList" class="ng-scope">
<!-- this is the LI I want to catch...
</li>
<!-- end ngRepeat: option in ::priceList -->
</ul>
</div>
</section>
</article>
</singleproduct>
당신이있어 니스 문제는, 그것은 github의 문제를, 그것을위한 새로운 eslint 규칙을 추가 따르도록 영감을 관심이있는 경우 : https://github.com/alecxe/eslint-plugin-protractor/issues/57 . 감사. – alecxe
@alecxe 플러그인이 있다는 것을 몰랐습니다. 매우 유용합니다! – faboolous
저는 바보입니다.이 규칙을 구현 한 것으로 알고 있습니다. https://github.com/alecxe/eslint-plugin-protractor/blob/master/docs/rules/no-array-finder-methods를 참조하십시오. .md. 감사. – alecxe