i need to select a tag that contains an innertext i specify.
can anyone help me with the xpath query ie <a href="#">wake up</a>
. So if i pass wake to the xpath, it should select this a link
thanks
i need to select a tag that contains an innertext i specify.
can anyone help me with the xpath query ie <a href="#">wake up</a>
. So if i pass wake to the xpath, it should select this a link
thanks
The XPath is simply //a[starts-with(., 'wake')]
.
wake
, not always equalto or start-with wake
– Smith
Jan 2 '12 at 13:07
contains
function instead e.g. //a[contains(., 'wake')]
.
– Martin Honnen
Jan 2 '12 at 14:40