# WebUI.verifyElementPresent question

**URL:** <https://forum.katalon.com/t/webui-verifyelementpresent-question/8824>\
**Category:** Web Testing\
**Tags:** katalon-studio\
**Created:** [January 12, 2018, 10:59am UTC](https://forum.katalon.com/t/webui-verifyelementpresent-question/8824 "2018-01-12T10:59:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![tamas\_kiss](https://avatars.discourse-cdn.com/v4/letter/t/65b543/32.png) [@tamas\_kiss](https://forum.katalon.com/u/tamas_kiss)\
**Post date:** [January 12, 2018, 10:59am UTC](https://forum.katalon.com/t/webui-verifyelementpresent-question/8824/1 "2018-01-12T10:59:00Z")

</div>

Hi,

I using this code

if( WebUI.verifyElementPresent( findTestObject( ‘Object repository/Error/error404’), 5, FailureHandling.OPTIONAL)){

WebUI.comment(" ERROR 404")

WebUI.takeScreenshot()  
}

but when verifyElementPresent is false I get a screenshot too. I don’t understand why ☹  
Can anyone help to me? verifyElementPresent take a screenshot automaticlly or what happend?

THX  
KiT

---

<div class="post-metadata">

**Author:** ![Rakesh\_Kumar](https://avatars.discourse-cdn.com/v4/letter/r/ba9def/32.png) [@Rakesh\_Kumar](https://forum.katalon.com/u/Rakesh_Kumar)\
**Post date:** [May 21, 2019, 10:27pm UTC](https://forum.katalon.com/t/webui-verifyelementpresent-question/8824/2 "2019-05-21T22:27:07Z")

</div>

I am also facing the same issue. It takes screenshot automatically whenever we verify whether the element is present or not. Even if the conditions are true but there are some info.

---

<div class="post-metadata">

**Author:** ![kazurayam](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/kazurayam/32/333_2.png) [@kazurayam](https://forum.katalon.com/u/kazurayam)\
**Post date:** [May 21, 2019, 11:41pm UTC](https://forum.katalon.com/t/webui-verifyelementpresent-question/8824/3 "2019-05-21T23:41:28Z")

</div>

Possibly your Project \> Settings \> Report has “Take screenshot when execution failed” toggled ON. Therefore verifyElementPreset() takes screenshot when it failed.

 ![12](https://europe1.discourse-cdn.com/katalon/original/2X/4/4208d0ee4e5b9c3e87399e58ebdccea4c158dcde.png)

You can toggle it off, then no screenshot will be taken.

Alternatively you want to switch `verifyElementPresent()` to `waitForElementPresent()`, which will NOT fail (this means, no StepFailedException with be thrown) so that no screenshot will be taken.
