# How to Prevent Browser from Closing in Running Test Suite

**URL:** <https://forum.katalon.com/t/how-to-prevent-browser-from-closing-in-running-test-suite/35579>\
**Category:** Web Testing\
**Tags:** katalon-studio\
**Created:** [October 31, 2019, 3:33am UTC](https://forum.katalon.com/t/how-to-prevent-browser-from-closing-in-running-test-suite/35579 "2019-10-31T03:33:56Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![rozhelt](https://avatars.discourse-cdn.com/v4/letter/r/bbe5ce/32.png) [@rozhelt](https://forum.katalon.com/u/rozhelt)\
**Post date:** [October 31, 2019, 3:33am UTC](https://forum.katalon.com/t/how-to-prevent-browser-from-closing-in-running-test-suite/35579/1 "2019-10-31T03:33:57Z")

</div>

After executing the first test case in the test suite, the browser automatically closes.

I have already unchecked the **Terminate drivers after each Test Case** and the **Terminate drivers after each Test Suite**. Refer to the screenshot.

 ![Terminate_Drivers](https://europe1.discourse-cdn.com/katalon/original/2X/f/fc1fd6a6b9ffabed193380ecc34f821ae387a9cd.jpeg)

I have also tried the code _**WebUI.callTestCase(findTestCase(‘Test Cases/Update-Offer-Disposition’), [:], FailureHandling.CONTINUE\_ON\_FAILURE)**_ but it failed and I received an error. Refer to the screenshot.

 ![Error_Message](https://europe1.discourse-cdn.com/katalon/original/2X/4/4028752df83b7e8d46ac786058f997437f9557fe.jpeg)

Is the code incorrect or is there other way to prevent the browser from closing after each test case? Thank you in advance for your help.

---

<div class="post-metadata">

**Author:** ![Funkey](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/funkey/32/8068_2.png) [@Funkey](https://forum.katalon.com/u/Funkey)\
**Post date:** [October 31, 2019, 7:52am UTC](https://forum.katalon.com/t/how-to-prevent-browser-from-closing-in-running-test-suite/35579/2 "2019-10-31T07:52:43Z")

</div>

Can you post a picture of your testcase?

---

<div class="post-metadata">

**Author:** ![rozhelt](https://avatars.discourse-cdn.com/v4/letter/r/bbe5ce/32.png) [@rozhelt](https://forum.katalon.com/u/rozhelt)\
**Post date:** [October 31, 2019, 8:28am UTC](https://forum.katalon.com/t/how-to-prevent-browser-from-closing-in-running-test-suite/35579/3 "2019-10-31T08:28:15Z")

</div>

I removed the code:

> WebUI.callTestCase(findTestCase(‘Test Cases/Update-Offer-Disposition’), [:], FailureHandling.CONTINUE\_ON\_FAILURE)

but here’s the first test case that was executed:

 ![asas](https://europe1.discourse-cdn.com/katalon/original/2X/d/d89e88109e57bade318b6c40f3fda83aed65b0f6.jpeg)

---

<div class="post-metadata">

**Author:** ![Funkey](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/funkey/32/8068_2.png) [@Funkey](https://forum.katalon.com/u/Funkey)\
**Post date:** [October 31, 2019, 10:33am UTC](https://forum.katalon.com/t/how-to-prevent-browser-from-closing-in-running-test-suite/35579/4 "2019-10-31T10:33:07Z")

</div>

I see that your test case is failing, please show me the full log. I don’t see any close browser functions what is making it close?

---

<div class="post-metadata">

**Author:** ![rozhelt](https://avatars.discourse-cdn.com/v4/letter/r/bbe5ce/32.png) [@rozhelt](https://forum.katalon.com/u/rozhelt)\
**Post date:** [November 6, 2019, 4:02am UTC](https://forum.katalon.com/t/how-to-prevent-browser-from-closing-in-running-test-suite/35579/5 "2019-11-06T04:02:13Z")

</div>

It has a `closebrowser()` function in the `afterTestcase` but when I tried to **Go to this step in Script view** I received a warning stating:

> `Unable to navigate to step 8 of test case 'Test Cases/Login/Login-User'`

since the test case only have 6 steps. How can I remove it?

 ![logs](https://europe1.discourse-cdn.com/katalon/original/2X/d/d09b6234a90a44efb6c2c52606b92e66965526e5.jpeg)
