WebUI.verifyElementNotHasAttribute returns error

I have a problem using it. When the attribute is not present, it returns true but if element has the attribute it returns an error:
com.kms.katalon.core.exception.StepFailedException: Object ‘Object Repository/radiobutton’ has attribute 'checked’ (Root cause: com.kms.katalon.core.exception.StepFailedException: Object ‘Object Repository/radiobutton’ has attribute 'checked’

What is wrong here? Is this a bug? With WebUI.verifyElementHasAttribute it is the exact opposite.

It’s return a StepFailedException which to my reckoning is correct. What are you expecting to happen?

Get boolean false

Add parameter FailureHandling to OPTIONAL

verifyElementHasAttribute(to, attributeName, timeOut, FailureHandling.OPTIONAL)

Okay, OPTIONAL works for me. Now I also see the false return. Thank you very much.