Ask a Question

Looking for help on how to use xpath match to verify an empty node

mwalter
Occasional Contributor

Looking for help on how to use xpath match to verify an empty node

Hi,

I have the following output of a JDBC query that I need to confirm the value in <_3></_3>, basically the data is the second line of an address.  When there is a value in the second line of the address, everything is fine but when there is only one line to the address and the second line is blank it comes back as below.   I'm trying to figure out how to configure the Expected Result in the Xpath Assertion for that value.  If I leave the Expected Result field blank, I suspect that everything will pass and it's not checking anything.  Null isn't correct either.  Need some thoughts on how to verify that no data comes back in that line.  Thanks in advance for any help/ideas.

 

<Results>
<ResultSet fetchSize="64">
<Row rowNumber="1">
<_2>450 N. SUNNYSLOPE RD.</_2>
<_3/>
<_4>BROOKFIELD</_4>
</Row>

1 REPLY 1
PaulMS
Super Contributor

Re: Looking for help on how to use xpath match to verify an empty node

Try some possible solutions here. 

https://community.smartbear.com/t5/SoapUI-Open-Source/how-to-say-i-am-expecting-null-in-assertion/m-...

 

I think that the easiest option is to use the select from current button to see if the expected result is <_3/>.

cancel
Showing results for 
Search instead for 
Did you mean: