Skip to content

Commit d58a688

Browse files
committed
FIX: Cleanup capabilities and options upon stop_browser. Fixes #40.
1 parent 0e63174 commit d58a688

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

botcity/web/bot.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,11 +233,16 @@ def check_driver():
233233
def stop_browser(self):
234234
"""
235235
Stops the Chrome browser and clean up the User Data Directory.
236+
237+
Warning:
238+
After invoking this method, you will need to reassign your custom options and capabilities.
236239
"""
237240
if not self._driver:
238241
return
239242
self._driver.close()
240243
self._driver.quit()
244+
self.options = None
245+
self.capabilities = None
241246
self._driver = None
242247

243248
def set_screen_resolution(self, width=None, height=None):

mkdocs.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ theme:
3232
name: Switch to light mode
3333

3434
markdown_extensions:
35+
- admonition
36+
- pymdownx.details
3537
- pymdownx.highlight
3638
- pymdownx.superfences
3739

0 commit comments

Comments
 (0)