I'm comparing two xml in soapUi (Groovy) and I want to ignore some tags (not just one)
I tried this solution below but didn't work :
def ExpectedString = 'Expected Xml'
def ResponseString ='XML SoapResponse to compare'
Diff diff = DiffBuilder.compare(ExpectedString)
.withTest(ResponseString)
.ignoreComments()
.ignoreWhitespace()
.checkForSimilar()
.withNodeFilter{node -> !node.getNodeName().equals('somerandomstuff')}
.withNodeMatcher(new DefaultNodeMatcher(new ByNameAndTextRecSelector(),
ElementSelectors.byNameAndText))
.build()
Something wrong with my code ? I get this error :
No signature of method: org.xmlunit.builder.DiffBuilder.withNodeFilter()
is applicable for argument types: (Script4$_run_closure2) values:
[Script4$_run_closure2@2ea2e326] Possible solutions:
withNodeFilter(org.xmlunit.util.Predicate)
Thanks !