# WebUI.verifyElementPresent always returns true in v7.2.6

**URL:** <https://forum.katalon.com/t/webui-verifyelementpresent-always-returns-true-in-v7-2-6/40740>\
**Category:** Bug Report\
**Tags:** bugs-report, katalon-studio\
**Created:** [March 5, 2020, 3:47pm UTC](https://forum.katalon.com/t/webui-verifyelementpresent-always-returns-true-in-v7-2-6/40740 "2020-03-05T15:47:01Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Russ\_Thomas](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/russ_thomas/32/11884_2.png) [@Russ\_Thomas](https://forum.katalon.com/u/Russ_Thomas)\
**Post date:** [March 5, 2020, 4:05pm UTC](https://forum.katalon.com/t/webui-verifyelementpresent-always-returns-true-in-v7-2-6/40740/2 "2020-03-05T16:05:18Z")

</div>

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…

```auto
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:

> [@Creation of Test Object in Object Repository in Runtime](http://forum.katalon.com/t/creation-of-test-object-in-object-repository-in-runtime/10333/2):
>
> Hi Indurajan I use this: /\*\* \* Construct a Katalon-compatible TestObject in memory. \* @param css (String) The CSS selector used to find the target element. \* @return (TestObject) The constructed TestObject. \*/ static TestObject makeTO(String css) { TestObject to = new TestObject() to.addProperty("css", ConditionType.EQUALS, css) return to }

---

_[View the full topic](https://forum.katalon.com/t/webui-verifyelementpresent-always-returns-true-in-v7-2-6/40740)._
