From e6df59e95885cfc069b26b9499123c6abbed9091 Mon Sep 17 00:00:00 2001 From: g1879 Date: Mon, 14 Oct 2024 00:02:29 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DPage=E5=AF=B9=E8=B1=A1?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E4=B8=8B=E8=BD=BD=E8=B7=AF=E5=BE=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98=EF=BC=9B=20=E4=BC=98=E5=8C=96=E7=AD=89=E5=BE=85?= =?UTF-8?q?=E6=96=B0tab=E9=80=BB=E8=BE=91=EF=BC=9B=20=E6=8E=A5=E7=AE=A1?= =?UTF-8?q?=E6=9D=A5=E8=87=AAselenium=E5=92=8Cplaywright=E7=9A=84=E6=B5=8F?= =?UTF-8?q?=E8=A7=88=E5=99=A8=E6=97=B6=E5=BF=BD=E7=95=A5=E6=97=A0=E5=A4=B4?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=EF=BC=9B=20=E4=BC=98=E5=8C=96=E5=85=B3?= =?UTF-8?q?=E9=97=ADtab=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DrissionPage/_pages/mix_tab.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/DrissionPage/_pages/mix_tab.py b/DrissionPage/_pages/mix_tab.py index 186451a..3e3332b 100644 --- a/DrissionPage/_pages/mix_tab.py +++ b/DrissionPage/_pages/mix_tab.py @@ -179,7 +179,10 @@ class MixTab(SessionPage, ChromiumTab, BasePage): else super().cookies(all_domains, all_info) 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: self._session.close() if self._response is not None: