Skip to content

upload command does not accept accessibility tree refs (fill/click do) #1107

@pleasedodisturb

Description

@pleasedodisturb

Description

The upload command rejects accessibility tree refs (e29) that fill and click accept. It only works with CSS selectors. This is an API inconsistency — users expect refs from snapshot output to work uniformly across all commands.

Reproduction

# Take a snapshot to get refs
agent-browser snapshot
# Output includes: button "Attach" [ref=e29]

# These work with refs:
agent-browser fill 'e26' 'Jane'          #
agent-browser click 'e3'                  #

# This works with CSS selector:
agent-browser upload 'input[type="file"]' resume.pdf  #

# This fails with ref:
agent-browser upload 'e29' resume.pdf     # ✗ "Element not found"

Expected Behavior

upload 'e29' resume.pdf should resolve the ref to the underlying <input type="file"> element, same as fill and click resolve their refs.

Environment

  • agent-browser v0.23.4 (Homebrew)
  • macOS Darwin 25.4.0 (Apple Silicon)
  • Target page: Greenhouse job application form (job-boards.greenhouse.io)

Context

Found during a web agent comparison benchmark testing 5 browser automation tools against real job application flows. agent-browser performed well overall (7.6/10) — this was the only API inconsistency found.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions