4.1.0.0b11

This commit is contained in:
g1879 2024-07-24 15:48:21 +08:00
parent 6255a096ba
commit 0b40011a00

View File

@ -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: