Skip to content

bug: can't observe input type file #972

Closed

Description

@KrishavRajSingh

Not able to observe input type file

await stagehand.init();

const page = await stagehand.page;
await page.goto("https://jobs.ashbyhq.com/primer.io/66430335-c4b6-4724-ba14-cf69e808075c/application?utm_source=LinkedInPaid", { waitUntil: 'domcontentloaded', timeout: 30000 });


const observations = await page.observe({
    instruction: "find all input file type element for resume",
    iframes: true
})
console.log(observations);

result:

[
  {
    description: "File upload element for resume with 'Upload File' button and drag-and-drop functionality",
    method: 'click',
    arguments: [],
    selector: 'xpath=/html[1]/body[1]/div[1]/div[2]/div[2]/div[2]/div[1]/div[2]/div[1]/div[3]/div[1]/div[1]'
  }
]
Screen.Recording.2025-08-21.at.2.23.36.AM.mov

It would be nice if we can directly upload files, maybe something like setInputFiles but for stagehand where all i need to do is pass filepath as variable and it can act and upload the file instead of clicking on upload file button where human intervention is required.

Activity

  1. akeimach commented on Nov 3, 2026

    @akeimach
    Contributor

    Fixed by #1975

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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