我试图找到一种方法来搜索中有名为X的行,然后使用UI量角器该行中点击复选框。
我一直很成功为止。
如果你看到下面,我想搜索testproxy然后单击与之相关联的复选框。
<div id="general_section">
<p> The following proxies are available to add to a cluster.</p>
<div class="table-responsive">
<table id="proxies_table" class="table table-striped table-bordered">
<thead>
<tr>
<th><input type="checkbox" ng-model="selectAll" ng-click="selectAllServers(selectAll)" class="ng-pristine ng-untouched ng-valid"></th>
<th res-key="settings.emailProxy.proxy">Proxy</th>
</tr>
</thead>
<tbody>
<!-- ngRepeat: server in model.selectedServers | orderBy:'hostname' --><tr ng-repeat="server in model.selectedServers | orderBy:'hostname'">
<td>
<input type="checkbox" ng-model="server.selected" class="ng-pristine ng-untouched ng-valid">
</td>
<td>
testproxy
</td>
</tr><!-- end ngRepeat: server in model.selectedServers | orderBy:'hostname' --><tr ng-repeat="server in model.selectedServers | orderBy:'hostname'">
<td>
<input type="checkbox" ng-model="server.selected" class="ng-pristine ng-valid ng-touched">
</td>
<td>
testproxy_1
</td>
</tr><!-- end ngRepeat: server in model.selectedServers | orderBy:'hostname' -->
</tbody>
</table>
<p class="lead ng-hide" ng-show="model.selectedServers.length === 0 && isAdd">No available proxies.</p>
<p class="lead ng-hide" ng-show="model.selectedServers.length === 0 && !isAdd">There are no proxies to remove.</p>
</div>
</div>