I have a node as follows:
<span class="portal-text-medium">Office Hours</span>
For the XPath I use
//span[text()='Office Hours']
which should work, but it never does. I can use *contains(text(),'Office Hours')]*
but that won't find an exact match and I have to verify there is no "*". This is not the only time it hasn't worked for me. I have seen it work before so I don't know what is wrong. Any idea?
Yes I can, and do, use starts-with
but it is not quite the same.
Question&Answers:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…