feature: действие typing — ввод как у человека, кириллица (#14)
fill остаётся мгновенным. typing подводит курсор по кривой, кликает в поле, стирает старое значение и набирает текст посимвольно с паузами; символы вне раскладки (кириллица) больше не роняют ввод. Значение typing маскируется в логах. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
49a2f3024a
commit
1075267d27
8 files changed
+74
-25
No files matched your search
@@ -170,3 +170,16 @@ def test_window_held_between_tasks(env):
|
||||
|
||||
assert client.delete("/v2/sessions/current").json() == {"closed": True}
|
||||
assert env.pool.used == 0
|
||||
|
||||
|
||||
def test_typing_like_a_human(client):
|
||||
"""typing: клик по полю и посимвольный ввод, включая кириллицу; поле сначала очищается."""
|
||||
data = solve(client, url="https://httpbin.org/forms/post", actions=[
|
||||
{"type": "fill", "selector": "input[name=custname]", "value": "old value"},
|
||||
{"type": "typing", "selector": "input[name=custname]", "value": "Иван Smith-2"},
|
||||
{"type": "submit", "selector": "form button"},
|
||||
{"type": "inner_text", "selector": "body"},
|
||||
])
|
||||
assert data["status"] == "ok", data
|
||||
assert json.loads(data["actions"][-1]["result"])["form"]["custname"] == "Иван Smith-2"
|
||||
assert data["actions"][1]["duration_ms"] > 12 * 50 # посимвольно, с паузами
|
||||
Reference in new issue
Block a user