Below is my DOM.
<div class="clickable ng-binding ng-scope" ng-click="controller.selectElement(tab, detail)" ng-class="{active:(detail===(tab.selectedElement || (tab.selectedElements && tab.selectedElements[detail.property])))}" ng-repeat="detail in tab.selectedSource.detail | orderBy:'title'">
<!-- ngIf: tab.label ==='Table Data' -->
City
</div>
Can anyone tell me how to locate element in xpath by text for the above DOM. I'm specific to locate element by text because the text between the tags are only thing which is unique.
I Tried Below Xpath.
//div[contains(text(),'City')],
//div[text()='City']
Please advice.
Thanks.