I have 4 text with same name as 'HOD' and I want to click on first 'HOD'.
I have tried all these: 1.//a[contains(text(),'HOD') ][1] 2.//a[@class="link_job ng-binding"][1]
<ul type="none" class="job-search-results ng-scope" ng-if="flag && flag != undefined" id="ulId" ng-repeat="j in jobResult" xpath="1">
<!-- ngIf: j.statusId == 1 --><li ng-if="j.statusId == 1" class="job-small ng-scope"><a href="" class="big-a"></a><a href="" ng-click="fetchJobById(j.id);insertRecentSearch(j.position.id,'aaa')" class="link_job ng-binding">HOD</a>
<div class="ng-binding"><b>Department:</b> Computer_Science</div>
<div><b>Job Summary:</b> <p class="ng-binding">HOD should own masters degree in their onw field.
</p>
</div>
<img ng-src="resources/img/logo-placeholder.png" style="height:64px;" src="resources/img/logo-placeholder.png">
<!-- ngIf: j.status == 'Applied' -->
</li><!-- end ngIf: j.statusId == 1 -->
<!-- ngIf: j.statusId !=1 -->
</ul>
I expect that it should click on first HOD text.