# Katalon FAILURE HANDLING works on some Test steps only and not all

**URL:** <https://forum.katalon.com/t/katalon-failure-handling-works-on-some-test-steps-only-and-not-all/12116>\
**Category:** Miscellaneous\
**Created:** [July 18, 2018, 12:18pm UTC](https://forum.katalon.com/t/katalon-failure-handling-works-on-some-test-steps-only-and-not-all/12116 "2018-07-18T12:18:33Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Aditya\_Srivastava](https://avatars.discourse-cdn.com/v4/letter/a/e47c2d/32.png) [@Aditya\_Srivastava](https://forum.katalon.com/u/Aditya_Srivastava)\
**Post date:** [July 18, 2018, 12:18pm UTC](https://forum.katalon.com/t/katalon-failure-handling-works-on-some-test-steps-only-and-not-all/12116/1 "2018-07-18T12:18:33Z")

</div>

The Failure.STOP\_ON\_FAILURE works on some test cases and does not work on some.also tried if method and keywordutill but it did not work

I want to stop my Test case when an element is not present and , it should show failed

---

<div class="post-metadata">

**Author:** ![B\_L](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/b_l/32/976_2.png) [@B\_L](https://forum.katalon.com/u/B_L)\
**Post date:** [August 1, 2018, 3:00pm UTC](https://forum.katalon.com/t/katalon-failure-handling-works-on-some-test-steps-only-and-not-all/12116/2 "2018-08-01T15:00:38Z")

</div>

Can you give us an example of the code and what your results are after running it? It should be stopping if it does not find.

Typically something like this should be sufficient:  
WebUI.verifyElementPresent(findTestObject(‘katalonObjectPath’), 1, FailureHandling.STOP\_ON\_FAILURE)

in most cases this should work fine. If it’s not I’d be interested in what you are attempting.
