修复Page对象设置下载路径问题;

优化等待新tab逻辑;
接管来自selenium和playwright的浏览器时忽略无头设置;
优化关闭tab逻辑
This commit is contained in:
g1879 2024-10-14 00:02:29 +08:00
parent 65d561e079
commit e6df59e958

View File

@ -179,7 +179,10 @@ class MixTab(SessionPage, ChromiumTab, BasePage):
else super().cookies(all_domains, all_info) else super().cookies(all_domains, all_info)
def close(self, others=False, session=False): def close(self, others=False, session=False):
self.browser.close_tabs(self.tab_id, others=others) if others:
self.browser.close_tabs(self.tab_id, others=True)
else:
self.browser._close_tab(self.tab_id)
if session and self._session: if session and self._session:
self._session.close() self._session.close()
if self._response is not None: if self._response is not None: