修正驱动和修改变量值
This commit is contained in:
@@ -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. 可选:隐藏键盘
|
||||
|
||||
Reference in New Issue
Block a user