From 26ab0d36e45b1b65f667d4743eb30e83389ff57f Mon Sep 17 00:00:00 2001 From: Tianren Dong Date: Wed, 13 May 2026 02:35:01 -0400 Subject: pi-chrome 0.14.2: recover from foreign-extension input overlays When a different Chrome extension (password manager, autofill popup, etc.) anchors an overlay to the focused input, Chrome's CDP refuses our Input.dispatchMouseEvent with 'Cannot access a chrome-extension:// URL of different extension'. The CDP target list shows the foreign chrome-extension:// URL as type:'other' attached to the same tab. New behaviour in cdp() wrapper: 1. On that specific error for any Input.* call, snapshot CDP targets to identify the offending extension id and log it (foreign-ext- detected event added to ring buffer). 2. Send Esc via Input.dispatchKeyEvent (key dispatch routes by focus, not coordinates, so it bypasses the overlay) to dismiss the popup. 3. Retry the original Input.* call once. 4. If retry still fails, throw a clear error naming the foreign extension id and listing three concrete workarounds: disable that extension on the page, use Tab-to-focus instead of clicking, or run /chrome quiet off. --- test-suite/index.html | 211 +++++++++++++++++++++++++++++++++----------------- 1 file changed, 139 insertions(+), 72 deletions(-) (limited to 'test-suite/index.html') diff --git a/test-suite/index.html b/test-suite/index.html index e125f55..a4a3c0c 100644 --- a/test-suite/index.html +++ b/test-suite/index.html @@ -1,90 +1,157 @@ -pi-chrome anti-automation test suite +pi-chrome browser-control benchmark -
-

pi-chrome anti-automation test suite

-

Each row links to a challenge page. Open it, drive the interaction with chrome_* tools, -then read window.__verdict via chrome_evaluate. Use the "Run all" button below -to poll every challenge's verdict into a single table.

+
+

pi-chrome browser-control benchmark

+

This benchmark measures how well Chrome-control tools let agents do real browser work: DOM discovery, trusted input, keyboard/focus, scroll, drag/drop, files, frames, clipboard, and observability.

- - +
+
+ + + + + +
+

Open a row, drive it with chrome_* tools, then return here. Verdicts are read from localStorage. Expected outcomes come from manifest.json.

+ +
+ +
+
idfileverdictopen
+ + + + +
idcategoryverdictexpectedbaselineriskgoal / notesopen
-

- -

How to drive from pi

-
-# 1. Start static server in test-suite/
-python3 -m http.server 8765
-
-# 2. From pi:
-chrome_navigate http://127.0.0.1:8765/challenges/01-is-trusted-click.html
-chrome_click selector=#go
-chrome_evaluate JSON.stringify({v:window.__verdict, r:window.__reason})
-
- +

Agent run loop

+
python3 -m http.server 8765
+# For each manifest entry:
+# 1. chrome_navigate http://127.0.0.1:8765/<file>
+# 2. chrome_snapshot before acting; prefer uid selectors.
+# 3. Execute recipe with selected mode, adapting descriptive frame/shadow selectors to tool uids.
+# 4. chrome_evaluate JSON.stringify({v:window.__verdict,r:window.__reason,e:window.__events?.slice(-20)})
+# 5. Compare verdict to manifest.expected[mode]; CONDITIONAL means inspect prerequisites/notes.
+
-
-- cgit v1.2.3