Forum Discussion
"Blank" and "Null" are not the same, so if you try to compare those the validation will fail.
A workaround is to concatenate these with some "keyword"; any keyword will do. So your XPath expression (slightly optimized) will be:
concat(//*:result/*:leads/*:array/*:contactNumber, "keyword")
And your expected result will be:
${DataSource#PHONE_NO}keyword
i have similar issue but with JDBC and i got my Groovy script to work. this is what i have so far. below is link to my post
This groovy works. try it..
def ActualSourceCode = context.expand( '${ABC_XYZ#ResponseAsXml#//Results[1]/ResultSet[1]/Row[1]/SOURCE_CODE[1]}' )
log.info "JDBCSourceCode= $ActualSourceCode"
def ExpectedSourceCode = context.expand( '${DataSource#SourceCode1}' )
log.info "EXCELSourceCode= $ExpectedSourceCode"
if(ActualSourceCode == 'NOVALUE')
{
ExpectedSourceCode = 'NOVALUE'
assert ExpectedSourceCode == ActualSourceCode
log.info "SourceCodeNotEntered = $ActualSourceCode"
}
else
{
assert ExpectedSourceCode == ActualSourceCode
log.info "SourceCodeEntered = $ActualSourceCode"
}