[Webtest] namespaces and verifyxpath
Thu, 29 Jul 2004 09:38:13 +0200
I use verifyxpath and storexpath in different tests. with some webpages,
these steps simply don't work (e.g. I get "no match for xpath expression
/html/head/title; see example below). it took me some time to find out the
problem: when a webpage specifies a namespace, xpath evaluation fails. some
of the webpages I have to check are written in the XHTML standard. such
pages need to have the namespace set in the root (--> <html>) element.
for the xpath expression "/html/head/title" I don't get a match. when I
remove the namespace, it works of couse.
any ideas for a workaround except changing the html sources?