If I were you, I would rather writte as follows:
4 WebUI.clickfindTestObject("Main Application/button_ok")
5 boolean result = WebUI.waitForElementPresent("Main Application/Level Contract/text_infoLog", 3, CONTINUE_ON_FAILURE)
6 if (result) {
/* when found */
KeywordUtil.logInfo("everything is fine")
else {
/* when not found */
KeywordUtil.markFailed("text_infoLog is not found")
}
See KeywordUtil (Katalon Studio API Specification) for the KeywordUtil class.
What’s the difference between WebUI.verifyElementPresent() and waitForElementPresent() ?
See the following dicsussion: