Forum Discussion
Unhandled
15 years agoContributor
Ok, briefly tried to figure this one out on my own, but then decided to just search.
https://www.eviware.com/forum/viewtopic.php?t=859Using info from above post...change your script to something like:
step = testRunner.testCase.testSteps["submitCheck-Base"]
noFault = step.assertions["NoFaultAssertion"]
fault = step.assertions["FaultAssertion"]
if (${DataSource#Assertion} == "accept") {
noFault.disabled = true
fault.disabled = false
} else if (${DataSource#Assertion} == "error") {
noFault.disabled = false
fault.disabled = true
} else {
noFault.disabled = false
fault.disabled = false
}
Or, more concise (perhaps not as efficient):
step = testRunner.testCase.testSteps["submitCheck-Base"]
noFault = step.assertions["NoFaultAssertion"]
fault = step.assertions["FaultAssertion"]
noFault.disabled = false
fault.disabled = false
if (${DataSource#Assertion} == "accept") noFault.disabled = true
if (${DataSource#Assertion} == "error") fault.disabled = true