[Webtest] Namespace prefixes in XPath

Marc Guillemot Marc Guillemot <mguillemot@yahoo.fr>
Wed, 20 Dec 2006 03:44:12 -0800 (PST)


Hi Caleandro,

this is a current limitation. Perhaps I am wrong but I think that Jaxen (the
XPath) engine should handle it. As long as it is not the case I agree that
WebTest should make it automatically. Perhaps can you open an issue for it
to avoid that it gets lost.

As workaround you can look at earlier posts:
http://www.nabble.com/Namespace-support-tf2253850.html#a6263047

Marc.


Caleandro wrote:
> 
> Hi all,
> 
> Testing webservices responses with Webtest (R_1393) I need to verify an
> element, with:
> 
> <verifyXPath xpath="//SOAP-ENV:Body" description="verify tag existence"/>
> 
> but got an exception like:
> 
> com.canoo.webtest.engine.StepExecutionException: Unexpected exception
> caught: org.jaxen.UnresolvableException: Cannot resolve namespace prefix
> 'SOAP-ENV', Step: VerifyXPath at
> D:\TestsRoot\AAGC\BatchTests\AAGC_WS_0001_VIC.xml:13:  with
> (description="verify tag existence", taskName="verifyXPath",
> xpath="//SOAP-ENV:Body")
> 	at com.canoo.webtest.steps.Step.handleUnexpectedException(Step.java:463)
> 	at com.canoo.webtest.steps.Step.execute(Step.java:139)
> 
> 
> Any suggestion?
> 
> Thank to anyone for a reply.
> Vito
> 
> _______________________________________________
> WebTest mailing list
> WebTest@lists.canoo.com
> http://lists.canoo.com/mailman/listinfo/webtest
> 
> 

-- 
View this message in context: http://www.nabble.com/Namespace-prefixes-in-XPath-tf2859217.html#a7988641
Sent from the WebTest mailing list archive at Nabble.com.