Forum Discussion

sonata's avatar
sonata
New Contributor
13 years ago

checking null values in the response

Is there a way you can check for null values in the response using assertions?

Ex
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<ns2:GenerateTokenResponse xmlns:ns2="http://ws.cctransaction/">
<return/>
</ns2:GenerateTokenResponse>
</S:Body>
</S:Envelope>

the field return contains null. how do i test this?

2 Replies

  • M_McDonald's avatar
    M_McDonald
    Super Contributor
    If you mean to determine if the [tt:zfk5lejd]return[/tt:zfk5lejd] element is 'empty', you can use

    not(//return/node())