Let’s say I have the following HTML code:
<a href="/site/somesite/">
somesite</a>
My question is how can I write an XPath expression that must use the text() property to match the somesite link and I cannot change the source?
I’m not sure whether you want to lookup the URL based on the link text, or the link text based on the URL. This will get you the URL:
This will get you the text: