I have this not so neat HTML piece:
<a href="#" onclick="JavaScript:fnActivity('-247239453','C');return false;">
ACCOUNT
-
<span class="td-copy-nowrap">4575 <span class="td-copy-nowrap">6017785<span class="td-link-icon">›</span></span></span>
</a>
And I have this meta-information: 6017785
Can I write a xpath selector that will find the link (a
) element based on this number?
I tried //span[contains(text(), '6017785')]/ancestor::a
but it doesn't seem to work, probably because of the span inside a span, near the number?