Hello guys, i wrote some code and when i’m trying to make an if-else statement it fails. Here is my code:
if (WebUI.verifyElementPresent(findTestObject(‘Object Repository/if-else/Page_Operator/div_Operator already has activ’), 4) == true) {
WebUI.click(findTestObject(‘if-else/Page_Operator/button_Clear’))
} else {
WebUI.click(findTestObject(‘vbm.vtb.ge/Page_Operator/click_phone’))
}
I’ve tried too many things but nothing works. It works when it goes in if statement, but if IF statement is false the test stops. I’ve also tried FailureHandling.OPTIONAL, with that it works but is there any way to make it without failurehandling ?