stagehand icon indicating copy to clipboard operation
stagehand copied to clipboard

set `force: true` for `locator.fill`

Open seanmcguire12 opened this issue 7 months ago • 1 comments

why

  • we should still fill input boxes even if they do not pass playwrights built in actionability checks
  • e.g., dropdown is expanded, and the element we want to fill is hidden underneath it

what changed

  • set force: true inside locator.fill()
  • removed keyboard.type() since it is unlikely to make a difference for antibot

test plan

  • added an eval

seanmcguire12 avatar Apr 18 '25 03:04 seanmcguire12

🦋 Changeset detected

Latest commit: 41d86b92983f1f436c337806920e100a2f46ac76

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@browserbasehq/stagehand Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

changeset-bot[bot] avatar Apr 18 '25 03:04 changeset-bot[bot]

Is this working for cases where it's not topmost? I.e does force fill work different than force click

@miguelg719 good question. yeah force fill will just directly set the value of the element. ie, its not coordinate based. I also added an eval for this where the element to fill is covered by a dropdown

seanmcguire12 avatar Apr 21 '25 22:04 seanmcguire12