I am trying to write Xpath to uniquely identify one element The document looks something like this
<AAA>
<div> </div>
<div> </div>
<div>
<div id='d'>YES</div>
</div>
<div> </div> ---> Want to select based on the mentioned sibling condition
<div> </div>
</AAA>
I want to select the div element who is following sibling of the div element, containing the child div element[containing YES]. I tried doing this which failed:
//following-sibling::div[@id='d']/div[contains(. , 'YES')]
Please help.