selenium webdriver - Get XPath of element where parent contains specific text -
i have code looks below , want click on 'view details' tag p contains text 'dublin' how can xpath?
<div class="office-name"> <p class="">dublin</p> <p class="abc"> <a target="abc" >view map</a> <a href="">view details</a> </p> </div>
try
//p[contains(text(), 'dublin')] /following-sibling::p[@class="abc"][1] /a[contains(text(),'view details')]
Comments
Post a Comment