JackStoneS
9 years agoOccasional Contributor
NullPointerException on XPathContains (JDBC-teststep): why?
I have a JDBC-teststep, requesting some info from a database.
I get some rows back, and want to assert their validity with an XPathContains.
For the first row, this works: the data matches and the assertion is green.
On subsequent assertions I get the correct error if the data does not match, but I get an error if the data does match: XPathContains assertion failed for path [/Results/ResultSet/Row[2]] : NullPointerException:null (see screenshot)
What can I do to get the assertion to green?
- Glad to know that it worked.
As mentionedarlier, list order of Rows may get changed.
Below should have worked too(it is different from initial reply)
//Results/ResultSet/Row[@rowNumber='2']
I think you should rely on VISSOORT is DAB.
Hope this helps. You can close it by accepting the solution if you wish.