From 238f347a03b2cefb21198bb78a90699e931d8504 Mon Sep 17 00:00:00 2001 From: Tianren Dong Date: Sat, 26 Sep 2026 19:07:56 -0400 Subject: Report hidden-tab input, append targeted typing, smarter uploads, prune screenshots; release 0.15.54 - Check page visibility before trusted input: Chrome drops input to hidden pages (inactive tabs, covered/minimized windows, macOS window tabs behind full screen). Type/key/hover/scroll/tap/drag fail fast with the reason; click/fill use their DOM fallback immediately (or reject with domFallback:false). - Use an inactive tab instead of a new window for the automation target while the user's window is full screen. - chrome_type with uid/selector moves the caret to the end (moveToEndOfDocument) after its focus click. - chrome_upload_file: labels/wrappers resolve to their file input, same-origin iframe search, and intercepted file chooser for upload buttons (trusted click when visible, user-gesture click when hidden); reject multiple paths for single-file inputs; no duplicate change event. - Prune default-folder chrome_screenshot captures (7 days, newest 20 kept, retentionDays override). - input.debug without a target no longer calls tabs.get(-1). - New hidden-input unit suite. --- test-suite/unit/background-policy.test.mjs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'test-suite/unit/background-policy.test.mjs') diff --git a/test-suite/unit/background-policy.test.mjs b/test-suite/unit/background-policy.test.mjs index fe71634..2388d78 100644 --- a/test-suite/unit/background-policy.test.mjs +++ b/test-suite/unit/background-policy.test.mjs @@ -50,7 +50,7 @@ function piHarness({ session = "alpha", send } = {}) { formatChromeInspect: JSON.stringify, summarizeActionResult: () => "", formatIncludedSnapshotText: (_r, text) => text, describeTypeEvidence: () => [], formatCdpResult: (_method, value) => ({ content: [{ type: "text", text: JSON.stringify(value) }], details: { value } }), workspaceCwd: () => ctx.cwd, ...path, - mkdir: async () => {}, writeFile: async (...args) => writes.push(args), + mkdir: async () => {}, writeFile: async (...args) => writes.push(args), pruneScreenshotDir: async () => 0, }; const registrations = indexSource.slice(indexSource.indexOf("function registerChromeTools(pi:"), indexSource.lastIndexOf("\n}")); vm.runInNewContext(stripTypeScriptTypes([ @@ -292,6 +292,7 @@ function workerHarness({ withWindows = true } = {}) { w, chrome, calls, tabs, focusedWindow: () => focusedWindow, cdpResult: (method) => method === "Page.captureScreenshot" ? { data: "c2NyZWVuc2hvdA==" } : method === "DOM.requestNode" ? { nodeId: 1 } + : method === "Runtime.callFunctionOn" ? { result: { type: "object", value: { tag: "INPUT", isFile: true } } } : { result: { type: "boolean", value: true, objectId: "file-input" } }, }; return h; -- cgit v1.2.3