mirror of
https://github.com/KenanZhu/AutoLibrary.git
synced 2026-06-21 00:43:03 +08:00
fix(pages): 移除裸 except Exception 改用精确异常类型并加固元素操作防护
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -45,8 +45,6 @@ class ReserveResultDialog(Dialog):
|
||||
return self._find(*self._titleLocator()).text
|
||||
except (NoSuchElementException, StaleElementReferenceException):
|
||||
return ""
|
||||
except Exception:
|
||||
return ""
|
||||
|
||||
def isSuccess(
|
||||
self,
|
||||
@@ -77,5 +75,3 @@ class ReserveResultDialog(Dialog):
|
||||
return [el.text for el in elements if el.text.strip()]
|
||||
except (NoSuchElementException, StaleElementReferenceException):
|
||||
return []
|
||||
except Exception:
|
||||
return []
|
||||
|
||||
Reference in New Issue
Block a user