Skip to content

Commit 4074f66

Browse files
authored
Merge pull request #89 from botcity-dev/ENH/Improving-stop-browser-method
ENH: Activate the tab before closing the browser.
2 parents e44d9dd + eb2f31d commit 4074f66

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
@@ -326,6 +326,8 @@ def stop_browser(self):
326326
"""
327327
if not self._driver:
328328
return
329+
if self.get_tabs():
330+
self.activate_tab(self.get_tabs()[-1])
329331
self._driver.close()
330332
self._driver.quit()
331333
self.options = None

0 commit comments

Comments
 (0)