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:
xst
2026-07-15 10:52:16 +08:00
parent 7b4a54f1ce
commit 7c5a4c5de7
6 changed files with 18 additions and 18 deletions
+2 -2
View File
@@ -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")