修正驱动和修改变量值

This commit is contained in:
2026-06-16 10:26:43 +08:00
parent de5173ded6
commit a41ba4501f
9 changed files with 45 additions and 30 deletions

View File

@@ -142,9 +142,14 @@ class LoginPage:
logging.info(f"匹配到账号信息username={existing_username}, account_id={account_id}")
else:
logging.warning(f"账号 {existing_username} 未返回 account_id已设为 False")
else:
logging.error(f"未找到与用户名 '{existing_username}' 匹配的账户信息")
return False
if not password:
logging.error(f"获取到的密码为空,无法登录")
return False
password_field.send_keys(password)
# 4. 可选:隐藏键盘
@@ -239,9 +244,14 @@ class LoginPage:
logging.info(f"匹配到账号信息username={existing_username}, account_id={account_id}")
else:
logging.warning(f"账号 {existing_username} 未返回 account_id已设为 False")
else:
logging.error(f"未找到与用户名 '{existing_username}' 匹配的账户信息")
return False
if not password:
logging.error(f"获取到的密码为空,无法登录")
return False
password_field.send_keys(password)
# 4. 可选:隐藏键盘