[Webtest] problems with verifyxpath

Massimiliano Mauri webtest@lists.canoo.com
Mon, 26 Apr 2004 09:00:03 +0200

I'm testing a web application and I have some problems with <verifyxpath...>

This steps seems not work. 
For example, searching in the page a link with the step <verifyxpath stepid="verify xpath 1" xpath="//a"/> canoo web test get a failure message (com.canoo.webtest.engine.StepFailedException).

In the report Canoo WebTest returns this message
com.canoo.webtest.engine.StepFailedException: xpath test: //a matched no nodes, 
Step: VerifyXPath at file:C:/.../test/build.xml:29: 
with (text="null", stepId="verify xpath 1", xpath="//a", regex="false", 

I'm tryng also with <verifyxpath stepid="verify xpath 1" xpath="//a[@href='myPage.jsp']"/>, but I have the same result. (and the link exists in the tested page)

My first question is: this step search an <a> tag in the page HTML with label "null"? why?
reading the syntax reference if the text attribute is not specified <verifyxpath> "...match at least one node in the document object model..."

The page HTML may be a simple HTML or have to be a XHTML?

I have another question: <verifyxpath> supports XSLfunctions like count(), text()...?

I hope somebody will be able to help me...