Forum Discussion
Hi,
you can disable them from the UI and then run the test or you can use groovy to disable them with a condition.
An example would be below:
//if you are data driving the tests, it would have a unique id or number which is stored in custom prop
def test_case_id = context.expand( '${#TestCase#test_case_id}' )
//if your testcase has xyz condition then enable xxx testSteps and disable xxz testSteps
if (test_case_id == '001') {
testRunner.testCase.getTestStepByName( "exact name of disabled testStep" ).disabled = false
testRunner.testCase.getTestStepByName( "exact name of enable teststeps" ).disabled = true
}
else if (test_case_id == '002'){
testRunner.testCase.getTestStepByName( "testStepname" ).disabled = true
testRunner.testCase.getTestStepByName( "testStepname" ).disabled = false
That should help you I hope :)