XPath text() expression that contains a new line -
let's have following html code:
<a href="/site/somesite/"> somesite</a>
my question how can write xpath expression must use text()
property match somesite
link , cannot change source?
i'm not sure whether want lookup url based on link text, or link text based on url. url:
//a[normalize-space() = 'somesite']/@href
this text:
normalize-space(//a[@href = '/site/somesite/'])
Comments
Post a Comment