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

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -