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

refactor(operators): 为 _showTrace 方法添加合适的 TraceLevel 参数

This commit is contained in:
2026-03-18 11:02:52 +08:00
parent ec683cf154
commit 160d6a2428
11 changed files with 109 additions and 66 deletions
+2 -2
View File
@@ -42,7 +42,7 @@ class LibLogout(LibOperator):
) -> bool:
if self.__driver is None:
self._showTrace("未提供有效 WebDriver 实例 !")
self._showTrace("未提供有效 WebDriver 实例 !", self.TraceLevel.WARNING)
return False
try:
self.__driver.find_element(
@@ -51,5 +51,5 @@ class LibLogout(LibOperator):
self._showTrace(f"用户 {username} 注销成功 !")
return True
except Exception as e:
self._showTrace(f"用户 {username} 注销失败 ! : {e}")
self._showTrace(f"用户 {username} 注销失败 ! : {e}", self.TraceLevel.ERROR)
return False