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:
@@ -138,9 +138,9 @@ def ensure_login(web_config, page, config):
|
||||
|
||||
# ── skip_login: false,执行 UI 登录(可能有验证码,会失败) ──
|
||||
page.goto(f"{base_url}/login")
|
||||
page.getByPlaceholder("请输入用户名").fill(account["phone"])
|
||||
page.getByPlaceholder("请输入密码").fill(account["password"])
|
||||
page.getByRole("button", name="登录").click()
|
||||
page.get_by_placeholder("请输入用户名").fill(account["phone"])
|
||||
page.get_by_placeholder("请输入密码").fill(account["password"])
|
||||
page.get_by_role("button", name="登录").click()
|
||||
|
||||
# 如果有图形验证码,这里会超时
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user