I have a test case where Verify Option Not Present By Label fails because the drop down option is present. I see a red x over the test step as expected and when I click on the test step I see the message:
(Root cause: com.kms.katalon.core.exception.StepFailedException: 1 option(s) with label ‘Division 1’ is/are present in object ‘Object Repository/Login Page/select_Division Dropdown’
The problem is my test case passes even though the step failed. This is misleading because when I see a test case passing I assumed all of the steps have passed.
You can stop your TC immediately when a step fails by adding the FailureHandling component/parameter to your statement:
WebUI.verifyOptionNotPresentByLabel(findTestObject('Login Page/select_Division Dropdown’), ‘Doors’, false, 10, FailureHandling.STOP_ON_FAILURE)
I personally don’t like my TCs to stop so that I get to see all the anomalies. I also review the reports on each run looking for any GROOVY or WARNING messages.
Or you can change the default FailureHandling of all Test Cases.
Hello thank you for the assistance but WebUI.verifyOptionNotPresentByLabel(findTestObject('Login Page/select_Division Dropdown’), ‘Doors’, false, 10, FailureHandling.STOP_ON_FAILURE ) does not stop the test case when the step fails. The step receives a red x but the test case continues and the test cases passes. I agree with your work around of reviewing each step in the report searching for failed steps. I hope Katalon can improve verifyOptionNotPresentByLabel by making the test case fail when the keyword fails so that I do not need to review the status of each step in test cases that have passed.