Forum Discussion

mlenosgrande's avatar
mlenosgrande
Contributor
16 years ago

[Xpath] Problem with assertion for a node

Hi, i'm currently using SoapUI Free edition 3.2-beta 2.
And i have a weird problem with a Xpath assertion:

I have this in response:


 

 
     
       
           
           

(...)
And i'm using this xpath to assert that the "niveau" with id='2' is in the response:

Xpath expression;
//*:niveau[@id='2']

& the expected result is :


but i have this error message:
XPathContains comparison failed, expecting [  ], actual was [null]

but if i try this :
exitsts(//*:niveau[@id='2'])
& the expected result is : True
it works !!?

But this syntax is quite difficult to read & lmaintain & i would like to use the 1st syntax (i ve tried to ignore namespace, add them.. stil doesnt work).

Any idea ?

Regards

3 Replies