From e7ab81092b5d4b9423fdcf0e65d975d7608ca8fa Mon Sep 17 00:00:00 2001 From: g1879 Date: Fri, 26 Jul 2024 19:44:26 +0800 Subject: [PATCH] =?UTF-8?q?4.1.0.0b14=E4=BF=AE=E5=A4=8D=E5=B0=8F=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DrissionPage/__init__.py | 2 +- DrissionPage/_pages/chromium_frame.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/DrissionPage/__init__.py b/DrissionPage/__init__.py index a8db515..1774967 100644 --- a/DrissionPage/__init__.py +++ b/DrissionPage/__init__.py @@ -14,4 +14,4 @@ from ._pages.chromium_page import ChromiumPage from ._pages.mix_page import MixPage from ._pages.mix_page import MixPage as WebPage -__version__ = '4.1.0.0b13' +__version__ = '4.1.0.0b14' diff --git a/DrissionPage/_pages/chromium_frame.py b/DrissionPage/_pages/chromium_frame.py index 62264bd..f97dea3 100644 --- a/DrissionPage/_pages/chromium_frame.py +++ b/DrissionPage/_pages/chromium_frame.py @@ -194,6 +194,7 @@ class ChromiumFrame(ChromiumBase): def _onFrameDetached(self, **kwargs): """同域变异域""" self.browser._frames.pop(kwargs['frameId'], None) + ChromiumFrame._Frames.pop(kwargs['frameId'], None) if kwargs['frameId'] == self._frame_id: self._reload() @@ -411,7 +412,7 @@ class ChromiumFrame(ChromiumBase): :param timeout: 查找超时时间(秒) :return: 上级元素对象 """ - return self.frame_ele.parent(level_or_loc, index) + return self.frame_ele.parent(level_or_loc, index, timeout=timeout) def prev(self, locator='', index=1, timeout=0, ele_only=True): """返回当前元素前面一个符合条件的同级元素,可用查询语法筛选,可指定返回筛选结果的第几个