My scenario is, A screen appears intermittently and I want to tap close button in screen, if it appears or tap on another button when it doesn’t. I tried many statements given for webUI. But nothing worked.
Code:
if (Mobile.verifyElementExist(findTestObject(‘Live Mode/Secure Message screen X_Btn’), true)) {
Mobile.tap(findTestObject(‘Live Mode/Secure Message screen X_Btn’))
} else {
‘Tapping on More Menu opens Left Menu list.’
Mobile.tap(findTestObject(‘Live Mode/More Menu_Btn’), 0)
Katalon image: