Greetings!!!
Using this code below, I am trying to to check if an element finally found into a page but something is wrong here…
if (WebUI.verifyElementPresent(findTestObject('blah blah blah'), 2)) {
println('Found')
} else {
println('Not Found')
}
boolean check = WebUI.verifyElementPresent(findTestObject('blah blah blah'), 2)
if (check) {
println('Found')
} else {
println('Not Found')
}
If element exists I can see the Found word in console but if it doesn’t exist I just get an error instead of see Not found word!!!
Any idea why is this happening? What am I doing wrong?
Thank you for your time!!!