mirror of
https://github.com/KenanZhu/AutoLibrary.git
synced 2026-06-21 17:03:03 +08:00
refactor: 时间选择逻辑下沉至 Dialog、Worker 模板方法抽象、配置访问安全化与代码风格统一
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -31,12 +31,18 @@ class ReserveResultDialog(Dialog):
|
||||
|
||||
super().__init__(driver, self.ROOT, auto_close_on_exit=False)
|
||||
|
||||
def _titleLocator(
|
||||
self,
|
||||
) -> tuple:
|
||||
|
||||
return (By.CSS_SELECTOR, ".layoutSeat dt")
|
||||
|
||||
def getTitle(
|
||||
self,
|
||||
) -> str:
|
||||
|
||||
try:
|
||||
return self._find(*self._title_locator()).text
|
||||
return self._find(*self._titleLocator()).text
|
||||
except (NoSuchElementException, StaleElementReferenceException):
|
||||
return ""
|
||||
except Exception:
|
||||
@@ -73,9 +79,3 @@ class ReserveResultDialog(Dialog):
|
||||
return []
|
||||
except Exception:
|
||||
return []
|
||||
|
||||
def _title_locator(
|
||||
self,
|
||||
) -> tuple:
|
||||
|
||||
return (By.CSS_SELECTOR, ".layoutSeat dt")
|
||||
|
||||
Reference in New Issue
Block a user