WebUI.waitForElement*() not throwing exception

Workaround:

  import com.kms.katalon.core.exception.StepErrorException as StepErrorException
  import com.kms.katalon.core.exception.StepFailedException as StepFailedException

  present1 = WebUI.waitForElementPresent(findTestObject('Object Repository/TestPage/msgBox'), 1)
  if (  present1 ) throw new StepFailedException ( "Cant find msgBox" )

or if you like

  if ( WebUI.waitForElementPresent(findTestObject('Object Repository/TestPage/msgBox'), 1) ) {
    throw new StepFailedException ( "Cant find msgBox" )
  }