WebUI.verifyElementPresent always returns true in v7.2.6

Hi community / Katalon team,

We noticed some tests are failing since updating to Katalon Studio v7.2.6. This appears to be caused by WebUI.verifyElementPresent always returning true, even when the element is not present. See below for an example snippet.

When running the same test on 7.2.1, the WebUI.verifyElementPresent correctly returns true or false depending on whether the element is found.

if (WebUI.verifyElementPresent(findTestObject(‘input_postalcode’), 2, FailureHandling.OPTIONAL))
{
… some code here…
}

I can’t confirm this is a problem until I install 7.2.6. However, I can confirm it is working properly in 7.2.4.

Please try the same code on your system, and report back…

WebUI.navigateToUrl("http://forum.katalon.com/")

WebUI.waitForPageLoad(10)

TestObject logo = makeTO("#site-logo")

if(WebUI.verifyElementPresent(logo, 10, FailureHandling.OPTIONAL)) {
  println "XXXXXXXXX Should see this"
} else {
  println "XXXXXXXXX Should NOT see this"
}

logo = makeTO("#site-logo-not-present")

if(WebUI.verifyElementPresent(logo, 10, FailureHandling.OPTIONAL)) {
  println "XXXXXXXXX Should NOT see this"
} else {
  println "XXXXXXXXX Should see this"
}

You can get a copy of makeTO here:

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.