[英]How do I locate child element using protractor locators?
Can you suggest locator for <input>
element in the following DOM? 您可以建议以下DOM中
<input>
元素的定位符吗? by.repeater only gets me till <td>
element. by.repeater只会让我直到
<td>
元素。 Any subsequent protractor locator is not locating <input>
element underneath. 任何后续的量角器定位器均未在其下定位
<input>
元素。 Thank you in advance! 先感谢您!
<table class="table table-striped table-hover">
<thead>
<tbody class="ng-scope" ng-repeat="devices in collection track by $index" >
<tr class="ng-scope ng-isolate-scope" st-select-row="devices" st-select-mode="single">
<td>
<chk-select class="ng-isolate-scope" emitselectedrec="selectedRows" chkmode="multiple" rowobj="clusters">
<input type="checkbox" ng-transclude="" ng-click="pushToSelected(row)" uid="1">
</chk-select>
</td>
</tr>
</tbody>
</table>
如果您依赖chk-select
元素及其rowobj
属性,该rowobj
:
element(by.css("chk-select[rowobj=clusters] input[type=checkbox]"));
you can use JavascriptExecutior driver. 您可以使用JavascriptExecutior驱动程序。 I will enhance my answer soon but you can do alot with this driver.
我将尽快提高答案,但是您可以使用此驱动程序做很多事情。
在你的情况下,它只是element(by.css('input'))
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.