From 0b40011a00f6ab6abef4cfb634f5b3802717acbb Mon Sep 17 00:00:00 2001 From: g1879 Date: Wed, 24 Jul 2024 15:48:21 +0800 Subject: [PATCH] 4.1.0.0b11 --- DrissionPage/_units/waiter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DrissionPage/_units/waiter.py b/DrissionPage/_units/waiter.py index 101dd01..002bede 100644 --- a/DrissionPage/_units/waiter.py +++ b/DrissionPage/_units/waiter.py @@ -133,7 +133,7 @@ class BaseWaiter(OriginWaiter): end_time = perf_counter() + timeout ele = self._owner._ele(loc_or_ele, raise_err=False, timeout=timeout) timeout = end_time - perf_counter() - if timeout <= 0: + if timeout <= 0 or not ele: if raise_err is True or Settings.raise_when_wait_failed is True: raise WaitTimeoutError(f'等待元素显示失败(等待{timeout}秒)。') else: