我想选择/定位这个ng repeat块的第一个td(文本“hermonie”)元素。我想使用以下量角器代码 element(by.repeater('result in memory').row(1).column('!!!!????')).getText()
获取此元素的文本。我知道ng绑定通常在html页面源代码中可用,但在这种情况下,html源代码中不存在ng绑定值,html源代码中只有23个脚本元素可用。以下是本节的html和inspect数据代码-
网站-https://www.way2automation.com/angularjs-protractor/banking/#/manager/list
html源代码-
<body ng-app="BankApp" ng-controller="bodyCtrl" style="background:#e8e8e8;">
<div ui-view></div>
<script type="text/javascript" src="app.js"></script>
//After these there are another 22 script tags are showing also.
</body>
</html>
检查数据如下:
<tr ng-repeat="cust in Customers | orderBy:sortType:sortReverse | filter:searchCustomer" class="ng-scope">
<td class="ng-binding">Hermoine</td>
<td class="ng-binding">Granger</td>
<td class="ng-binding">E859AB</td>
<td><!-- ngRepeat: account in cust.accountNo --><span ng-repeat="account in cust.accountNo" class="ng-binding ng-scope">1001 </span><!-- end ngRepeat: account in cust.accountNo --><span ng-repeat="account in cust.accountNo" class="ng-binding ng-scope">1002 </span><!-- end ngRepeat: account in cust.accountNo --><span ng-repeat="account in cust.accountNo" class="ng-binding ng-scope">1003 </span><!-- end ngRepeat: account in cust.accountNo --></td>
<td><button ng-click="deleteCust(cust)">Delete</button></td>
</tr>
感谢您的帮助。非常感谢。
暂无答案!
目前还没有任何答案,快来回答吧!