待补平差检查和上传逻辑
This commit is contained in:
@@ -123,8 +123,21 @@ class LoginPage:
|
||||
|
||||
accounts = apis.get_accounts_from_server("68ef0e02b0138d25e2ac9918")
|
||||
matches = [acc for acc in accounts if acc.get("username") == existing_username]
|
||||
password = None
|
||||
account_id = False
|
||||
if matches:
|
||||
password = matches[0].get("password")
|
||||
|
||||
# ✅ 关键:把 account_id 存入全局变量
|
||||
account_id = matches[0].get("account_id", False)
|
||||
# 只有 account_id 存在时才存全局
|
||||
if account_id is not False:
|
||||
global_variable.GLOBAL_ACCOUNT_ID = account_id
|
||||
logging.info(f"匹配到账号信息:username={existing_username}, account_id={account_id}")
|
||||
else:
|
||||
logging.warning(f"账号 {existing_username} 未返回 account_id,已设为 False")
|
||||
|
||||
|
||||
|
||||
password_field.send_keys(password)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user