# Unable to verify object 'Object Repository/Form Search/Search\_datatable' is not present

**URL:** <https://forum.katalon.com/t/unable-to-verify-object-object-repository-form-search-search-datatable-is-not-present/32154>\
**Category:** Web Testing\
**Tags:** web-testing, katalon-studio\
**Created:** [August 26, 2019, 8:21pm UTC](https://forum.katalon.com/t/unable-to-verify-object-object-repository-form-search-search-datatable-is-not-present/32154 "2019-08-26T20:21:44Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![kgprakash](https://avatars.discourse-cdn.com/v4/letter/k/9fc29f/32.png) [@kgprakash](https://forum.katalon.com/u/kgprakash)\
**Post date:** [August 26, 2019, 8:21pm UTC](https://forum.katalon.com/t/unable-to-verify-object-object-repository-form-search-search-datatable-is-not-present/32154/1 "2019-08-26T20:21:44Z")

</div>

I am working on Search functionality. added multiple data in my excel sheet and here is the functionality how it works. if i give the exact id it will be navigated to the next page or will be stayed in the same page with partial search.  
my test case is passing when my script runs with the exact id and coming back to the search page. when the loop enters the 2nd set data (partial search) and able to display the results and it is not entering the 3rd data. here is the code i have written.

for (int rowNum = 1; rowNum \<= findTestData(‘LocationID’).getRowNumbers(); rowNum++) {  
WebUI.setText(findTestObject(‘Form Search/input\_Location ID or Name\_LocIdSearchString’), findTestData(‘LocationID’).getValue(1, rowNum))

```
WebUI.click(findTestObject('Form Search/button_Search'))

WebUI.delay(10)

if (WebUI.verifyElementNotPresent(findTestObject('Form Search/Search_datatable'), 0)) {
    WebUI.verifyElementPresent(findTestObject('Form Search/p_Forms Search Filing History'), 0)

    Thread.sleep(10)

    WebUI.click(findTestObject('Object Repository/Page_SAGE/a_Forms'))

    WebUI.click(findTestObject('Object Repository/Page_SAGE/a_Informational Forms Search'))
} else {
    WebUI.verifyElementPresent(findTestObject('Form Search/h1_Form Search'), 0)

    break
}

```

}  
error logs:  
Elapsed time: 57.716s

Test Cases/TC\_Form Search FAILED.  
Reason:  
com.kms.katalon.core.exception.StepFailedException: Unable to verify object ‘Object Repository/Form Search/Search\_datatable’ is not present

thanks  
prakash

---

<div class="post-metadata">

**Author:** ![HeleneB](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/heleneb/32/2775_2.png) [@HeleneB](https://forum.katalon.com/u/HeleneB)\
**Post date:** [August 27, 2019, 7:41am UTC](https://forum.katalon.com/t/unable-to-verify-object-object-repository-form-search-search-datatable-is-not-present/32154/2 "2019-08-27T07:41:15Z")

</div>

I guess the next part is “Caused by […] Web element […] is present”.

Present != Visible : an hidden element will be mark as “present” because it is on the DOM

---

<div class="post-metadata">

**Author:** ![kgprakash](https://avatars.discourse-cdn.com/v4/letter/k/9fc29f/32.png) [@kgprakash](https://forum.katalon.com/u/kgprakash)\
**Post date:** [August 27, 2019, 3:39pm UTC](https://forum.katalon.com/t/unable-to-verify-object-object-repository-form-search-search-datatable-is-not-present/32154/3 "2019-08-27T15:39:32Z")

</div>

Thanks Helene…but could you please gimme more clarification on this:  
I guess the next part is “Caused by […] Web element […] is present”.

Present != Visible : an hidden element will be mark as “present” because it is on the DOM

---

<div class="post-metadata">

**Author:** ![Nilau](https://avatars.discourse-cdn.com/v4/letter/n/bb73d2/32.png) [@Nilau](https://forum.katalon.com/u/Nilau)\
**Post date:** [August 27, 2019, 3:44pm UTC](https://forum.katalon.com/t/unable-to-verify-object-object-repository-form-search-search-datatable-is-not-present/32154/4 "2019-08-27T15:44:44Z")

</div>

What she meant is there’s a difference between “present” and “visible”.

You test fail because the element is still present. The test isn’t wrong and the code is working correctly.

The element is still present in the DOM, so the test fail. If you want to verify that the object isn’t visible to the user, you have to use verifyElementNotVisible().

Also, verifyElement() throw an exception when it fails, so you will never reach your else() statement. You should use waitForElement() instead.

I would recommend not using Thread.sleep() and use waitForElementVisible(findTestObject(‘Object Repository/Page\_SAGE/a\_Forms’), 10) instead. It will wait maximum 10 second or until the object is visible. It makes the test flow faster.

---

<div class="post-metadata">

**Author:** ![HeleneB](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/heleneb/32/2775_2.png) [@HeleneB](https://forum.katalon.com/u/HeleneB)\
**Post date:** [August 28, 2019, 6:55am UTC](https://forum.katalon.com/t/unable-to-verify-object-object-repository-form-search-search-datatable-is-not-present/32154/5 "2019-08-28T06:55:39Z")

</div>

Exactly @Nilau

> [@Nilau](#):
>
> Also, verifyElement() throw an exception when it fails, so you will never reach your else() statement. You should use waitForElement() instead.

Or verifyElement with FailureHandling.OPTIONAL

---

<div class="post-metadata">

**Author:** ![kgprakash](https://avatars.discourse-cdn.com/v4/letter/k/9fc29f/32.png) [@kgprakash](https://forum.katalon.com/u/kgprakash)\
**Post date:** [August 28, 2019, 6:28pm UTC](https://forum.katalon.com/t/unable-to-verify-object-object-repository-form-search-search-datatable-is-not-present/32154/6 "2019-08-28T18:28:49Z")

</div>

thanks Helene.

---

<div class="post-metadata">

**Author:** ![albert.vu](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/albert.vu/32/20595_2.png) [@albert.vu](https://forum.katalon.com/u/albert.vu)\
**Post date:** [August 8, 2022, 7:40am UTC](https://forum.katalon.com/t/unable-to-verify-object-object-repository-form-search-search-datatable-is-not-present/32154/7 "2022-08-08T07:40:04Z")

</div>

Archived on August 8, 2022, 7:40am UTC


