I am writing protractor test cases. I want to click on edit button. When I am checking by id
it is not found.
Code:
<table class="table table-bordered table-hover">
<thead>
<tr>
<th>Code</th>
<th>Start Date</th>
<th></th>
</tr>
</thead>
<tbody>
<tr ng-repeat="batch in batches.list">
<td><a ui-sref="root.courses.detail.batches.assessments({ batch_id: batch.id,assessment_status: 'published'})">BID00{{batch.id}}</a></td>
<td>{{batch.start_date}}</td>
<td>
<button id="edit" type="button" class="btn btn-default btn-sm" tooltip-placement="top" tooltip="Edit" ng-controller="batchesCtrl" ng-click="edit_batch(batch.id)"><i class="glyphicon glyphicon-edit"></i></button>
<button type="button" id="delete(batch.id)" class="btn btn-danger btn-sm" tooltip-placement="top" tooltip="Delete" ng-click="remove_batch(1, batch.id)" confirmation-needed="Do you really want to delete this batch?"><i class="glyphicon glyphicon-trash" ></i></button>
</td>
</tr>
</tbody>
</table>
How can I make it work?