In the Scripted Assertion, retrieve the value using:
String status = testExec.getStateValue("LWIFI_create_activityStatusEnum");
Or, you can use this as a safety net in case the variable is not initialized:
String status = testExec.getStateString("LWIFI_create_activityStatusEnum", "" );
The assertion can then check the 'status' variable based on requirements. For example,
// trap for getStateValue in case property uninitialized
If ( status == null )
return false;
// trap for getStateString in case property uninitialized
// technically this is unnecessary; however, here for example
If ( "".equals( status ) )
return false;
if ( "SUCCESS".equals( status ) )
return true;
else
return false;
In the above, the assertion branches to Error, Warning, etc. if the response is false. If the assertion returns true, the test case moves to the next step in the flow.
Alternative:
if ( testExec.getStateValue("LWIFI_create_activityStatusEnum") == null )
:
if ( "SUCCESS".equals( testExec.getStateValue("LWIFI_create_activityStatusEnum") ) )
and / or
if ( "".equals( testExec.getStateValue("LWIFI_create_activityStatusEnum") ) )