Let\'s say on a page I have alot of this repeated:
Magic: Edit Delete< 相关标签:
Use this XPath:
//div/h4[. = 'Magic:']/following-sibling::a[1]
It selects 1st following-sibling a element of h4 with value Magic:.
a
h4
Magic: