Skip to content

stagehand-python@4.4.0a0.dev1675

@seanmcguire12 seanmcguire12 tagged this 04 Nov 05:09
# why
- calling `act()` could prevent Stagehand from seeing and interacting
with newly loaded cross-origin iframes because its network-settling
helper overwrote the browser’s auto-attach configuration
# what changed
- removed the conflicting auto-attach call, leaving attachment
management to BrowserContext.
- added a regression test verifying that cross-origin iframes created
after act() remain visible in snapshots and support subsequent actions.


<!-- This is an auto-generated description by cubic. -->
---
## Summary by cubic
Fixes an issue where calling `act()` could prevent Stagehand from seeing
and interacting with newly loaded cross-origin iframes. The
network-settling helper in `actHandlerUtils.ts` was overwriting the
browser's auto-attach configuration, which broke attachment management
owned by BrowserContext.

- Removed the conflicting `Target.setAutoAttach` call; BrowserContext
now handles child-target attachment.
- Added a regression test verifying cross-origin iframes created after
`act()` remain visible in snapshots and support subsequent actions.

<sup>Written for commit c00a683d6ab753e88ce6434eb3db47a07202e341.
Summary will update on new commits.</sup>

<a
href="https://cubic.dev/pr/browserbase/stagehand/pull/3388?utm_source=github"
target="_blank" rel="noopener noreferrer"
data-no-image-dialog="true"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"><source
media="(prefers-color-scheme: light)"
srcset="https://www.cubic.dev/buttons/review-in-cubic-light.svg"><img
alt="View guided diff"
src="https://www.cubic.dev/buttons/review-in-cubic-light.svg"></picture></a>
<a
href="https://www.cubic.dev/action/auto-fix/pr/browserbase/stagehand/3388?returnTo=https%3A%2F%2Fgithub.com%2Fbrowserbase%2Fstagehand%2Fpull%2F3388&source=description"
target="_blank" rel="noopener noreferrer"
data-no-image-dialog="true"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://www.cubic.dev/buttons/turn-on-auto-fix-dark.svg"><source
media="(prefers-color-scheme: light)"
srcset="https://www.cubic.dev/buttons/turn-on-auto-fix-light.svg"><img
alt="Turn on auto-fix"
src="https://www.cubic.dev/buttons/turn-on-auto-fix-light.svg"></picture></a>

<!-- End of auto-generated description by cubic. -->
Assets 2
Loading