fix: Playwright API camelCase → snake_case (Python 版)
- getByPlaceholder → get_by_placeholder - getByRole → get_by_role - getByText → get_by_text - getByTestId → get_by_test_id
This commit is contained in:
@@ -90,8 +90,8 @@ def main():
|
||||
page.goto(login_url)
|
||||
|
||||
# ── 填入账号密码 ──
|
||||
page.getByPlaceholder("请输入用户名").fill(account["phone"])
|
||||
page.getByPlaceholder("请输入密码").fill(account["password"])
|
||||
page.get_by_placeholder("请输入用户名").fill(account["phone"])
|
||||
page.get_by_placeholder("请输入密码").fill(account["password"])
|
||||
print(f"👤 已填入账号: {account['phone']}(角色: {args.role})")
|
||||
print("📝 请在浏览器中手动完成验证码并点击登录...")
|
||||
print(" (登录成功后脚本会自动检测并保存)\n")
|
||||
|
||||
Reference in New Issue
Block a user