When running the following code (in Katalon Studio):
if (WebUI.verifyElementPresent(findTestObject('Object Repository/xyz'),
5, FailureHandling.OPTIONAL)) {
WebUI.click(findTestObject('xyz'))
}
I received the following error message:
Test Cases/abc FAILED because (of) Unable to click on object 'Object
Repository/xyz' (Root cause: org.openqa.selenium.ElementNotVisibleException:
element not visible)
So, even though the presence of the object is optional, I get an error message. Did you have a similar case?