On my web application I am attempting to select a button within a cell in a table.
Not every cell will contain a show details button and the button is only displayed depending on the text within that cell
Screenshot below
<td>
Allocated
<button ng-show="row.entitlementId" id="btnShowDetails" class="btn btn-primary btn-sm" style="width: 110px; float:right;" ng-click="showAllocationMonetaryDetails(row.entitlementId, CisBusinessID);" title="Show Details">
<span class="glyphicon glyphicon-search"></span>Show Details
</button>
<br>
<div style="font-size: small; color: darkgreen" ng-show="row.manualEstablishCommandType >= 0">
Adjustment
</div>
<div style="font-size: small; color: darkgreen" ng-show="row.manualReclaimCommandType >= 0">
</div>
</td>
I attempted to use the following xpath to locate the show details button but it does not work.
("//td[contains(.,'Allocated') and (contains(@id,'btnShowDetails'))]")
Does anybody know how I can select the Show Details button?
Thanks