Context
Glance is excellent for vision-first browser testing. However, it lacks a native tool for uploading files via <input type="file"> elements. This blocks any test scenario involving file uploads — a very common use case.
Current workaround
We worked around this using browser_evaluate with a two-step approach:
- DataTransfer + Object.defineProperty: Build a
File from base64, attach to the input via Object.defineProperty, fire change event.
- React-Fiber injection: Find
__reactProps$... key on the input element, call memoizedProps.onChange with a synthetic event.
This works for React-based apps but is fragile (depends on React internals) and doesn't generalize to other frameworks.
Proposed feature
Add mcp__glance__browser_file_upload tool, modeled after Microsoft Playwright MCP's browser_file_upload, which uses Playwright's native setInputFiles. This is:
- Framework-agnostic (works with React, Vue, vanilla JS, Web Components)
- Robust (uses CDP
DOM.setFileInputFiles under the hood)
- Well-tested (industry standard via Playwright)
API suggestion
mcp__glance__browser_file_upload({
selector: string, // CSS selector or accessibility ref
filePaths: string[], // absolute paths on test machine
})
Use case
We're building a humanlike E2E test suite for pdfredo.com (PDF tool platform with 36 tools). Every tool needs file upload as the entry point. Currently we maintain a 100+ line workaround helper. A native tool would simplify our test scenarios significantly.
Reference: Microsoft Playwright MCP file upload — https://github.com/microsoft/playwright-mcp
Context
Glance is excellent for vision-first browser testing. However, it lacks a native tool for uploading files via
<input type="file">elements. This blocks any test scenario involving file uploads — a very common use case.Current workaround
We worked around this using
browser_evaluatewith a two-step approach:Filefrom base64, attach to the input viaObject.defineProperty, firechangeevent.__reactProps$...key on the input element, callmemoizedProps.onChangewith a synthetic event.This works for React-based apps but is fragile (depends on React internals) and doesn't generalize to other frameworks.
Proposed feature
Add
mcp__glance__browser_file_uploadtool, modeled after Microsoft Playwright MCP'sbrowser_file_upload, which uses Playwright's nativesetInputFiles. This is:DOM.setFileInputFilesunder the hood)API suggestion
Use case
We're building a humanlike E2E test suite for pdfredo.com (PDF tool platform with 36 tools). Every tool needs file upload as the entry point. Currently we maintain a 100+ line workaround helper. A native tool would simplify our test scenarios significantly.
Reference: Microsoft Playwright MCP file upload — https://github.com/microsoft/playwright-mcp