浏览器析构方法
This commit is contained in:
parent
81c53ba373
commit
5d2b86d8e7
@ -9,6 +9,9 @@ class IDriver():
|
||||
browser: "WebDriver"
|
||||
|
||||
def __del__(self):
|
||||
self.terminate()
|
||||
|
||||
def terminate(self):
|
||||
self.browser.quit()
|
||||
|
||||
def new_tab(self) -> str:
|
||||
|
@ -73,7 +73,7 @@ class BrowserManager():
|
||||
|
||||
def terminate(self):
|
||||
if self._driver:
|
||||
del self._driver
|
||||
self._driver.terminate()
|
||||
|
||||
|
||||
class TabInfo(object):
|
||||
|
Reference in New Issue
Block a user