Merged
Conversation
tkattkat
approved these changes
Jul 25, 2025
| payload = ObserveResult(**action_or_result).model_dump( | ||
| exclude_none=True, by_alias=True | ||
| ) | ||
| if "description" in action_or_result: |
Collaborator
There was a problem hiding this comment.
is this related to the PR? seems like Claude Code / Cursor added unless intentional to have actFromObserve distinction when sending the payload to the API?
Collaborator
Author
There was a problem hiding this comment.
I added, it's so that people can pass sth like
await page.act({
"action": "click the button"
"iframes": True
})Previously it was only parsing the dict as an observe result
await page.act({
"description": "A brief description of the component",
"method": 'click',
"arguments": [],
"selector": 'xpath=/html/body[1]/div[1]/main[1]/button[1]'
})Makes it easy to copy-paste code from TS directly
filip-michalsky
approved these changes
Jul 25, 2025
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
why
The new version of Stagehand API supports iframes, but the python sdk doesn't directly support them
what changed
Enabled access to setting
iframes:Truewhenever the environment is "BROWSERBASE" (with api enabled)test plan