Skip to content

Commit 0c3cd84

Browse files
committed
ENH: Activate the tab before closing the browser.
1 parent 4e57088 commit 0c3cd84

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

botcity/web/bot.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,8 @@ def stop_browser(self):
303303
"""
304304
if not self._driver:
305305
return
306+
if self.get_tabs():
307+
self.activate_tab(self.get_tabs()[-1])
306308
self._driver.close()
307309
self._driver.quit()
308310
self.options = None

0 commit comments

Comments
 (0)