Forum Discussion
harry
6 years agoContributor
when i print the log statement for the property
callTC.getPropertyValue("MARKETCONTEXT_1")its returning empty. But some how its its returning null pointer.
TanyaYatskovska
Alumni
5 years agoHi harry,
I'm not a groovy expert. My first expectation would be to check if the object isn't null. something like:
if (obj!null)
' do something
or use try/catch.
- sonya_m5 years ago
Alumni
- harry5 years agoContributorI didn’t find any solution. My scenario of the test case is to send empty value for the node.
Eg: <marketContext/>
Or
<marketContext></marketContext>
Because when node value is not sent we are suppose to get different error exceptionmessage. When node is not passed in the xml we get different error exception message. But everyone is suggesting here not to pass null or empty node . That is not the solution to my problem.