mkliba
16 years agoOccasional Contributor
How to remove assertions on a Groovy by type or name?
Hi:
On a previous post I found that to remove assertions we can use:
def assertionsList = testRunner.getTestCase().getTestStepByName("Test Request").getAssertionList()
for( e in assertionsList){
testRunner.getTestCase().getTestStepByName("Test Request").removeAssertion(e)
}
Is there any way we can remove the assertions by assertion type and/or assertion name? Ex: Remove all type "XPath Match", or with name "My XPath Match"?
Thanks.
On a previous post I found that to remove assertions we can use:
def assertionsList = testRunner.getTestCase().getTestStepByName("Test Request").getAssertionList()
for( e in assertionsList){
testRunner.getTestCase().getTestStepByName("Test Request").removeAssertion(e)
}
Is there any way we can remove the assertions by assertion type and/or assertion name? Ex: Remove all type "XPath Match", or with name "My XPath Match"?
Thanks.