From b05f16e203ad29a53c50b85d54e279acb1d93390 Mon Sep 17 00:00:00 2001 From: kayqueGovetri Date: Mon, 8 May 2023 16:24:11 -0300 Subject: [PATCH] FIX: activate the tab before closing the browser --- botcity/web/bot.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/botcity/web/bot.py b/botcity/web/bot.py index b4f8e18..fa4b950 100644 --- a/botcity/web/bot.py +++ b/botcity/web/bot.py @@ -273,6 +273,8 @@ def stop_browser(self): """ if not self._driver: return + if self.get_tabs(): + self.activate_tab(self.get_tabs()[-1]) self._driver.close() self._driver.quit() self.options = None