Hi All,
My XPath expressions aren't matching text in cases where the text contains spaces created using . Take this example :
{code:html}<node>sample& nbsp;text</node>{code}
the Xpath expression "//node[ . = 'sample text']" won't match this node, "//node[ . = 'sample& nbsp;text']" also doesn' work. If the in the source is changed to a normal white space everything works just fine. I've been testing this with firefox, I get the same results even when using the "XPather" firefox extension for the Dom Inspector. As a side note i find that thing extremely handy for building Xpath expressions, definitely recommend it :)
I'm really hoping there is some kind of html-decode() function that can be used, or some other way of escaping things so it works. I've done a lot of searching and come up with nothing except this forum post :
http://osdir.com/ml/web.selenium.devel/2005-12/msg00040.html
Any help would be much appreciated!
Thanks,
Mark
Edited by: iceman153 on Feb 29, 2008 4:52 PM
Discovered the Edit feature and fixed the nbsp's