Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rm isTopElement check from isTextVisible #413

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

seanmcguire12
Copy link
Collaborator

why

  • checking if the parent element of text node is the top most element seems arbitrary: the parent element itself does not have to be the top most element for the text node itself to be visible
  • this part of what makes a github eval (not yet added to evals) fail

for example:

The highlighted code below is excluded from candidate elements with this check

Screenshot 2025-01-17 at 5 34 12 PM

what changed

  • remove the isTopMostElement check from isTextVisible

test plan

@seanmcguire12 seanmcguire12 added act These changes pertain to the act function extract These changes pertain to the extract function observe These changes pertain to the observe function text-extract These changes pertain to text-extract labels Jan 18, 2025
Copy link

changeset-bot bot commented Jan 18, 2025

🦋 Changeset detected

Latest commit: cd4c7ed

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

@seanmcguire12 seanmcguire12 requested a review from kamath January 18, 2025 01:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
act These changes pertain to the act function extract These changes pertain to the extract function observe These changes pertain to the observe function text-extract These changes pertain to text-extract
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant