[Fuego] [PATCH 11/16] Properly quit Selenium driver when SeleniumSession is deleted

Guilherme Campos Camargo guicc at profusion.mobi
Thu Mar 29 00:08:27 UTC 2018


Call `driver.quit()` when SeleniumContainerSession.__del__() method gets
called.

Signed-off-by: Guilherme Campos Camargo <guicc at profusion.mobi>
---
 engine/tests/Functional.fuegotest/test_run.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/engine/tests/Functional.fuegotest/test_run.py b/engine/tests/Functional.fuegotest/test_run.py
index 09b3a95..99bd309 100755
--- a/engine/tests/Functional.fuegotest/test_run.py
+++ b/engine/tests/Functional.fuegotest/test_run.py
@@ -428,6 +428,10 @@ class SeleniumContainerSession():
         LOGGER.debug('Started a Selenium Session on %s', self.root_url)
         return True
 
+    def __del__(self):
+        if self.driver:
+            self.driver.quit()
+
 
 def main():
     DEFAULT_TIMEOUT = 120
-- 
2.16.2



More information about the Fuego mailing list