Skip to content

High-performance browser automation bridge and multi-instance orchestrator with advanced stealth injection and real-time dashboard.

test: verify typing lands after a scaled screencast click

Boscha23e7be170d7
diff --git a/tests/e2e/scenarios/api/screencast-input-basic.sh b/tests/e2e/scenarios/api/screencast-input-basic.sh
index c2fe9450..80158faa 100644
--- a/tests/e2e/scenarios/api/screencast-input-basic.sh
+++ b/tests/e2e/scenarios/api/screencast-input-basic.sh
@@ -104,6 +104,18 @@ else
fail_assert "2x-frame click left focus on '${ACTIVE}', want 'inp'"
fi
+# Close the loop: the click focused the field, so typing (as the dashboard sends
+# it — insertText for printable chars) must land in that field. This is the exact
+# end-to-end path that was broken when clicks missed their target.
+TYPED_BODY=$(jq -nc --arg t "$SC_TAB_ID" '{kind:"keyboard-inserttext", tabId:$t, text:"Hello"}')
+pt_post /action "$TYPED_BODY" >/dev/null
+VAL=$(sc_eval 'document.getElementById("inp").value')
+if [ "$VAL" = "Hello" ]; then
+ pass_assert "typing after a scaled click lands in the focused input"
+else
+ fail_assert "typed text landed as '${VAL}', want 'Hello'"
+fi
+
end_test
# ─────────────────────────────────────────────────────────────────