I want to conduct a test on a web page built with AngularJS using Selenium WebDriver and Protractor.
Here is the HTML snippet that needs to be tested:
<tr ng-repeat="item in items" class="ng-scope">
<td class="ng-binding">
Item1
</td>
<td class="ng-binding">
description
</td>
<td class="ng-binding">
1234
</td>
<td>
<div ng-click="AddItem(item.id)" class="btn">Add Item</div>
</td>
</tr>
<tr ng-repeat="item in items" class="ng-scope">
<td class="ng-binding">
Item2
</td>
<td class="ng-binding">
description
</td>
<td class="ng-binding">
1235
</td>
<td>
<div ng-click="AddItem(item.id)" class="btn">Add Item</div>
</td>
</tr>
This is how it appears:
screenshot of the html angular page
Despite going through documentation, tutorials on youtube, and searching online, I am still unsure how to find and click "Add Item" for a specific item with a particular item id.
Could you please clarify the process for me?