[Webtest] verifyXPath problem

Dale Ogilvie webtest@lists.canoo.com
Thu, 15 Jun 2006 15:12:19 +1200


I wanted to verify the contents of a cell deep within an html page
generated by our webapp. I saved the html from the browser and used xpe
to locate the node of interest. Xpe generated this xpath:

Now if I include the verifyXPath element in my test

<verifyXPath description=3D"Check for price"
text=3D"$5295.00&amp;nbsp&amp;nbsp&amp;nbspEach" />

The test fails with:

"xpath test:
r/td/table/tbody/tr[1]/td[2]) evaluates to: , expected value is:

If I take the failed response html and then open it with xpe, the xpath
above *does* resolve to the correct string. Can someone suggest how to
resolve this? I assume it is showing up a difference between xpe and the
xpath implementation used in webtest. The beauty of verifyXPath is that
it provides a nicely focused way to get at data deep within the DOM, it
would be a shame to have to fall back to verifyText.


Dale Ogilvie
Trimble Navigation NZ Ltd