I've found that a good tool for learning xpath, and also for verifying xpath accuracy is an add-on for Firefox called XPather https://addons.mozilla.org/en-US/firefox/addon/1192
It is not really reliable enough to be used exclusively, but it is handy to have around for verification purposes Kelcy Monday Amelia A Lewis <[email protected]> Sent by: [email protected] 05/20/2009 04:09 PM Please respond to [email protected] To [email protected], Gregory Denton <[email protected]> cc Subject Re: [Webtest] verifyXPath not working (noobie question) The XPath doesn't match any nodes. :-) /{http://www.mycompany.org/schemas/auth}user != /{}user (using James Clark's "expanded" notations for XPaths). You'll need to provide your <config> with a namespace binding (say you bind the prefix "auth" to "http://www.mycompany.org/schemas/auth"), and then verify the XPath using the proper namespace (/auth:user if you did the binding in the last parenthetical comment). If you check the list archives, I posted a macro that can be defined that seems to work for XPath bindings. WebTest ... isn't very strong when faced with XML, in my opinion (apologies to the developers, but the clumsiness of defining namespaces is really ... surprising, to me (but I'm an XML geek, so *shrug*)). Amy! On Wed, 20 May 2009 11:48:27 -0700, Gregory Denton wrote: > I just got my project building and executing an initial GET request > which produces the response: > > <?xml version="1.0" encoding="UTF-8" standalone="yes"?> > <user xmlns="http://www.mycompany.org/schemas/auth" name="foo" id="0"> > <emailAddress>[email protected]</emailAddress> > </user> > > My webtest steps only contains (after the invoke): > > <verifyXPath xpath="/user"/> > > Which results in: > > xpath test: /user matched no nodes > > I am a noobie to webtest and must be doing something really dumb, but > have googled and can't find anything or figure it out. > > Thanks. > _______________________________________________ > WebTest mailing list > [email protected] > http://lists.canoo.com/mailman/listinfo/webtest _______________________________________________ WebTest mailing list [email protected] http://lists.canoo.com/mailman/listinfo/webtest

