How to find and click a table element by text using Protractor?
<tr id="item" ng-repeat="item in itemList>
<td id="code" ng-repeat="column in columns">Some Text</td>
</tr>
I've seen some other similar questions, but I haven't been able to solve it yet. What I have tried so far:
element.all(by.repeater('column in columns')).findElement(by.id('code')).getText('Some Text').click();
EDIT:
<tr ng-repeat="item in items>
<td>{{item.name}}</td>
<td>{{item.description}}</td>
</tr>
Result:
<tr>
<td>Some Name</td>
<td>Some Text</td>
</tr>
<tr>
<td>More Name</td>
<td>More Text</td>
</tr>
etc.
+3
source to share