This query is based on the my previous question here Watir-Webdriver - Unable to locate a button with id, name, text, value and i got some details on how to fetch the fields through elements. But now in one of my screen i have two buttons with same class and div. So i am not able to take the one which i need. I need to get the button which has "Checking and Savings" product. Could someone help on how to get the exact button click? And my web application is developed on AnjularJS.
Here's a full div portion of the HTML from the page where the button is identified.
<div class="jl-layout">
<div class="jl-layout-50-50">
<!-- ngRepeat: entry in ctrl.vm.productSuites.entries -->
<div style="" ng-repeat="entry in ctrl.vm.productSuites.entries" class="item product-container centered ng-scope">
<h3 class="ng-binding">Checking and Savings</h3>
<button type="button" tabindex="0" ng-click="ctrl.submitProductSelection(entry)" class="extra-button-padding secondary jl-button">
<ng-transclude>
<span class="ng-scope">Select</span>
</ng-transclude>
</button>
<div tabindex="0" role="button" ng-click="ctrl.submitProductSelection(entry)" class="mobile-click"/>
</div>
<!-- end ngRepeat: entry in ctrl.vm.productSuites.entries -->
<div style="" ng-repeat="entry in ctrl.vm.productSuites.entries" class="item product-container centered ng-scope">
<h3 class="ng-binding">Savings</h3>
<button type="button" tabindex="0" ng-click="ctrl.submitProductSelection(entry)" class="extra-button-padding secondary jl-button">
<ng-transclude>
<span class="ng-scope">Select</span>
</ng-transclude>
</button>
<div tabindex="0" role="button" ng-click="ctrl.submitProductSelection(entry)" class="mobile-click"/>
</div>
<!-- end ngRepeat: entry in ctrl.vm.productSuites.entries -->
</div>
</div>