codex - 💡(How to fix) Fix Browser Use cannot upload files because file chooser / setInputFiles is not exposed in Codex Desktop IAB [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openai/codex#20785Fetched 2026-05-03 04:45:29
View on GitHub
Comments
0
Participants
1
Timeline
3
Reactions
0
Participants
Timeline (top)
labeled ×3

Root Cause

This blocks realistic browser QA and smoke testing for common workflows such as:

  • CMS image/file upload fields
  • media library forms
  • attachment workflows
  • any app that requires local file selection before save/submit

The workaround is manual handoff to the native file picker, which prevents fully automated validation.

Fix Action

Fix / Workaround

The workaround is manual handoff to the native file picker, which prevents fully automated validation.

Code Example

typeof tab.playwright.locator("input[type=file]").setInputFiles
// "undefined"
RAW_BUFFERClick to expand / collapse

What variant of Codex are you using?

App (Desktop)

What happened?

Codex Desktop Browser Use can inspect real <input type="file"> controls in the in-app browser, but it cannot attach local files to them.

In a Drupal content form, Browser Use could see three file inputs:

  • files[field_image_hero_0][], accept="image/*"
  • files[field_image_title_card_0][], accept="image/*"
  • files[field_image_portrait_0], accept="image/*"

The site rendered the expected upload controls and file constraints, but Browser Use could not upload files.

Expected behavior

Browser Use should support file upload automation for real file inputs, equivalent to upstream Playwright's locator.setInputFiles(...).

Actual behavior

The Codex Browser Use PlaywrightLocator runtime does not expose setInputFiles.

A live capability check returned:

typeof tab.playwright.locator("input[type=file]").setInputFiles
// "undefined"

The bundled Browser Use skill documents a limited Playwright subset, and setInputFiles is not listed in the exposed locator API.

Why this matters

This blocks realistic browser QA and smoke testing for common workflows such as:

  • CMS image/file upload fields
  • media library forms
  • attachment workflows
  • any app that requires local file selection before save/submit

The workaround is manual handoff to the native file picker, which prevents fully automated validation.

Notes

This appears Codex-specific, not a general Playwright limitation. Upstream Playwright supports file uploads through locator.setInputFiles() for <input type="file">.

Related but not duplicate:

  • #20642: external/detachable Browser Use support

extent analysis

TL;DR

The issue can be worked around by manually implementing a file upload mechanism using the native file picker, as the Codex Browser Use PlaywrightLocator does not expose the setInputFiles method.

Guidance

  • Verify that the setInputFiles method is indeed not available in the Codex Browser Use PlaywrightLocator API by checking the documentation and running a capability check like the one provided.
  • Consider manually implementing a file upload mechanism using the native file picker as a temporary workaround.
  • Review the upstream Playwright documentation to understand how file uploads are handled and see if there are any potential workarounds or alternatives that could be applied to the Codex Browser Use.
  • Check if there are any existing issues or feature requests related to file upload support in Codex Browser Use that may provide additional context or solutions.

Example

No code example is provided as the issue does not imply a specific code solution, but rather a limitation in the Codex Browser Use API.

Notes

The issue appears to be specific to Codex Browser Use and not a general limitation of Playwright, which supports file uploads through the locator.setInputFiles() method.

Recommendation

Apply workaround: Manually implement a file upload mechanism using the native file picker, as the Codex Browser Use PlaywrightLocator does not expose the setInputFiles method, and there is no clear indication of an available fixed version that addresses this issue.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

Browser Use should support file upload automation for real file inputs, equivalent to upstream Playwright's locator.setInputFiles(...).

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

codex - 💡(How to fix) Fix Browser Use cannot upload files because file chooser / setInputFiles is not exposed in Codex Desktop IAB [1 participants]