1
1
mirror of https://github.com/KenanZhu/AutoLibrary.git synced 2026-06-18 15:33:03 +08:00

fix(*): optimize the operators' performance when invoking webdriver

we consume the wait time of webdriver and its
implicit wait time
This commit is contained in:
2025-11-22 14:13:23 +08:00
parent 1038a86aff
commit cd6c899388
5 changed files with 36 additions and 15 deletions
+3 -3
View File
@@ -41,13 +41,13 @@ class LibLogin(LibOperator):
# wait to verify login success
try:
WebDriverWait(self.__driver, 5).until( # title contains "自选座位 :: 座位预约系统"
WebDriverWait(self.__driver, 2).until( # title contains "自选座位 :: 座位预约系统"
EC.title_contains("自选座位 :: 座位预约系统")
)
WebDriverWait(self.__driver, 3).until( # search button presence
WebDriverWait(self.__driver, 2).until( # search button presence
EC.presence_of_element_located((By.ID, "search"))
)
WebDriverWait(self.__driver, 3).until( # select content presence
WebDriverWait(self.__driver, 2).until( # select content presence
EC.presence_of_element_located((By.CLASS_NAME, "selectContent"))
)
return True