# Browser closing

**URL:** <https://forum.katalon.com/t/browser-closing/8844>\
**Category:** Miscellaneous\
**Tags:** katalon-recorder\
**Created:** [January 13, 2018, 5:23pm UTC](https://forum.katalon.com/t/browser-closing/8844 "2018-01-13T17:23:08Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![demond\_jones](https://avatars.discourse-cdn.com/v4/letter/d/779978/32.png) [@demond\_jones](https://forum.katalon.com/u/demond_jones)\
**Post date:** [January 13, 2018, 5:23pm UTC](https://forum.katalon.com/t/browser-closing/8844/1 "2018-01-13T17:23:08Z")

</div>

Is it possible to export the "Python 2 (WebDriver+unittest) script and execute it without closing the browser? If so, how would I perform this task?

---

<div class="post-metadata">

**Author:** ![Liam\_B](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/liam_b/32/647_2.png) [@Liam\_B](https://forum.katalon.com/u/Liam_B)\
**Post date:** [January 15, 2018, 8:24am UTC](https://forum.katalon.com/t/browser-closing/8844/2 "2018-01-15T08:24:56Z")

</div>

> demond jones said:
> 
> Is it possible to export the "Python 2 (WebDriver+unittest) script and execute it without closing the browser? If so, how would I perform this task?

Hello,

You can achieve this by removing this line of code in tearDown method:

```auto
self.driver.quit()

```

```auto
def tearDown(self):
        self.driver.quit()
        self.assertEqual([], self.verificationErrors)

```

When the driver set to quit(), it means to close the current opened browser.

If you still have the problem, please feel free to let us know.

Regards,  
Liam

---

<div class="post-metadata">

**Author:** ![demond\_jones](https://avatars.discourse-cdn.com/v4/letter/d/779978/32.png) [@demond\_jones](https://forum.katalon.com/u/demond_jones)\
**Post date:** [January 15, 2018, 11:50pm UTC](https://forum.katalon.com/t/browser-closing/8844/3 "2018-01-15T23:50:40Z")

</div>

Thank you Liam for the quick reply. So I see what you mentioned has worked. I guess I thought that would work for me and what I wanted to perform. Removing the code above works when I run the script within IDLE; however, I suppose my goal is to have the browser not close when opening the file outside of IDLE so that I can different scripts for automated browser function. I am unable to use it for automated browser functions when the browser will close after completing the script.

Again…it works fine when I press the “run” option in IDLE; the browser will stay open until closed. It is when I double click the script that the browser will close after performing the actions created. Is there a way around this?

---

<div class="post-metadata">

**Author:** ![devalex88](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/devalex88/32/336_2.png) [@devalex88](https://forum.katalon.com/u/devalex88)\
**Post date:** [March 27, 2018, 4:03am UTC](https://forum.katalon.com/t/browser-closing/8844/4 "2018-03-27T04:03:52Z")

</div>

Hi. Sorry for the late response. Your question is about a feature outside of Katalon tools and should be best asked on StackOverflow. If you need that feature for your testing activities, you can try Katalon Studio instead of Python’s unittest.
