Repository navigation
[feat]: expose timeout param in page.snapshot() - #3083
Merged
Merged
Conversation
🦋 Changeset detectedLatest commit: 4054cdb The changes in this PR will be included in the next version bump. This PR includes changesets to release 21 packages
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 |
Contributor
There was a problem hiding this comment.
All reported issues were addressed across 29 files
Architecture diagram
sequenceDiagram
participant C as Client SDK (TS/Python/Go)
participant RPC as RPC Client
participant EXT as Extension (Understudy)
participant P as Page
participant CS as Capture Snapshot
participant PR as Progress
participant AT as A11y Tree
participant DT as DOM Tree
participant FS as Focus Selectors
participant CDP as CDP Session
Note over C,EXT: User-facing timeout param flows through all SDKs
C->>RPC: page.snapshot({timeout})
RPC->>RPC: Compute response deadline = timeout + grace
alt timeout = 0 or omitted
RPC->>RPC: No response deadline (unlimited)
else timeout > 0
RPC->>RPC: Set bounded response deadline
end
RPC->>EXT: RPC call with options
EXT->>P: snapshot(options, parentProgress)
alt Has parent progress
P->>PR: Reuse parent's remaining time budget
else No parent progress
P->>PR: CHANGED: Create new Progress with timeout
alt timeout = 0 or omitted
PR->>PR: Unlimited budget (Infinity)
else timeout > 0
PR->>PR: Set deadline = timeout ms
end
end
P->>CS: captureSnapshot(options, progress)
CS->>PR: throwIfStopped()
Note over CS,DT: Build session DOM indexes
CS->>DT: buildSessionIndexes(progress)
loop For each session
DT->>PR: throwIfStopped()
DT->>CDP: DOM.enable
DT->>CDP: DOM.getDocument (with retries)
alt CBOR stack error
DT->>PR: throwIfStopped()
DT->>CDP: Retry with different depth
else Deadline exceeded
DT->>DT: throw timeout error
end
end
Note over CS,FS: Resolve ignored nodes and focus locators
CS->>FS: resolveIgnoredNodes(progress)
FS->>FS: resolveCssFocusFrameAndTail(progress)
Note over CS,AT: Build accessibility trees per frame
loop For each frame in scope
CS->>PR: throwIfStopped()
CS->>AT: a11yForFrame(progress)
AT->>PR: throwIfStopped()
AT->>CDP: Accessibility.enable + Runtime.enable + DOM.enable
alt Has focus locator
AT->>FS: resolveObjectIdForCss/XPath(progress)
FS->>PR: throwIfStopped()
FS->>CDP: Runtime.evaluate
alt Returns after deadline
FS->>FS: releaseObject (cleanup)
FS->>PR: throwIfStopped()
else Valid response
FS->>CDP: releaseObject
end
end
AT->>CDP: Accessibility.getFullAXTree
alt Frame scope error
AT->>PR: throwIfStopped()
AT->>CDP: Fallback getFullAXTree (no frame)
else Deadline exceeded
AT->>AT: throw timeout error
end
end
Note over CS,P: Merge results
CS->>P: Merge frame maps
alt Happy path
P-->>RPC: SnapshotResult
RPC-->>C: Return formatted tree + maps
else Timeout exceeded
PR-->>CS: timeout error
CS-->>P: Propagate error
P-->>RPC: Error
RPC-->>C: Throw timeout error
end
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
Contributor
There was a problem hiding this comment.
All reported issues were addressed across 4 files (changes from recent commits).
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
miguelg719
approved these changes
Oct 1, 2026
filip-michalsky
approved these changes
Oct 1, 2026
This was referenced Oct 1, 2026
seanmcguire12
pushed a commit
that referenced
this pull request
Oct 8, 2026
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated. # Releases ## @browserbasehq/[email protected] ### Minor Changes - [#2821](#2821) [`a237c77`](a237c77) Thanks [@shrey150](https://github.com/shrey150)! - Replace the Eve extension's browser and web tools with Stagehand V4 `run`, `snapshot`, and `screenshot`. ### Patch Changes - [#3115](#3115) [`7abca76`](7abca76) Thanks [@seanmcguire12](https://github.com/seanmcguire12)! - update the Eve peer dependency to ^0.71.2 to use upstream security fixes. Requires Eve 0.71.2 or later within the 0.71.x release line. - Updated dependencies [[`34edfa3`](34edfa3), [`a837acf`](a837acf), [`4da1a21`](4da1a21), [`5802f59`](5802f59), [`819db28`](819db28), [`0210688`](0210688), [`666b6fa`](666b6fa), [`f3543d3`](f3543d3), [`f2060a6`](f2060a6), [`1562d35`](1562d35), [`7d8dcef`](7d8dcef), [`476658b`](476658b), [`70f4e91`](70f4e91)]: - @browserbasehq/[email protected] ## @browserbasehq/[email protected] ### Minor Changes - [#3030](#3030) [`34edfa3`](34edfa3) Thanks [@supremeboxlogos](https://github.com/supremeboxlogos)! - Export browser pages as PDF bytes in TypeScript, Python, and Go, with configurable print settings and timeouts, and optional local file saving in TypeScript and Python. - [#3118](#3118) [`a837acf`](a837acf) Thanks [@miguelg719](https://github.com/miguelg719)! - Add `clientOptions` to `browserbase.launch()` and `browserbase.connect()`. Thanks to [@pr1m8](https://github.com/pr1m8) for the original proposal that motivated this feature. - [#3083](#3083) [`666b6fa`](666b6fa) Thanks [@seanmcguire12](https://github.com/seanmcguire12)! - expose a timeout option for page.snapshot() across all sdks, defaulting to 20 seconds. set it to 0 for unlimited execution. one budget covers the whole snapshot capture. - [#3140](#3140) [`f2060a6`](f2060a6) Thanks [@seanmcguire12](https://github.com/seanmcguire12)! - automatically discover Stagehand extensions when connecting to browsers. deprecate & ignore extension IDs passed into .connect(). - [#2916](#2916) [`476658b`](476658b) Thanks [@seanmcguire12](https://github.com/seanmcguire12)! - add page level hooks for webmcp tools added and webmcp tools removed events. ### Patch Changes - [#3045](#3045) [`4da1a21`](4da1a21) Thanks [@github-actions](https://github.com/apps/github-actions)! - Keep telemetry disabled unless an OTLP traces endpoint is explicitly configured. - [#2893](#2893) [`5802f59`](5802f59) Thanks [@miguelg719](https://github.com/miguelg719)! - Bound experimental batch and RPC deadlines so callers can stop waiting without replaying actions or accepting late capture state. - [#2894](#2894) [`819db28`](819db28) Thanks [@miguelg719](https://github.com/miguelg719)! - Add configurable bounded CDP heartbeats and sanitized disconnect diagnostics with cleanup on shutdown. - [#2892](#2892) [`0210688`](0210688) Thanks [@miguelg719](https://github.com/miguelg719)! - Release a newly created Browserbase session when initial attachment fails, and support upload retries - [#2978](#2978) [`f3543d3`](f3543d3) Thanks [@seanmcguire12](https://github.com/seanmcguire12)! - Fix locator failures when entering loading iframes, and correctly target iframe elements when an XPath ends at the iframe. - [#3033](#3033) [`1562d35`](1562d35) Thanks [@seanmcguire12](https://github.com/seanmcguire12)! - add per-call locator timeouts across TypeScript, Python, & Go. one timeout covers frame readiness, element lookup, & execution, including typing delays & highlight duration. the default is 20 seconds. setting timeout to 0 disables it. - [#3146](#3146) [`7d8dcef`](7d8dcef) Thanks [@seanmcguire12](https://github.com/seanmcguire12)! - Make selector waits include frame readiness in their timeout, support unlimited waits with `timeout: 0`, and clean up observers when the wait ends. - [#3052](#3052) [`70f4e91`](70f4e91) Thanks [@seanmcguire12](https://github.com/seanmcguire12)! - Match native XPath semantics for `text()` predicates when a shadow root routes locators through the composed-tree parser ## @browserbasehq/[email protected] ### Minor Changes - [#3030](#3030) [`34edfa3`](34edfa3) Thanks [@supremeboxlogos](https://github.com/supremeboxlogos)! - Export browser pages as PDF bytes in TypeScript, Python, and Go, with configurable print settings and timeouts, and optional local file saving in TypeScript and Python. - [#3083](#3083) [`666b6fa`](666b6fa) Thanks [@seanmcguire12](https://github.com/seanmcguire12)! - expose a timeout option for page.snapshot() across all sdks, defaulting to 20 seconds. set it to 0 for unlimited execution. one budget covers the whole snapshot capture. - [#2916](#2916) [`476658b`](476658b) Thanks [@seanmcguire12](https://github.com/seanmcguire12)! - add page level hooks for webmcp tools added and webmcp tools removed events. ### Patch Changes - [#3045](#3045) [`4da1a21`](4da1a21) Thanks [@github-actions](https://github.com/apps/github-actions)! - Keep telemetry disabled unless an OTLP traces endpoint is explicitly configured. - [#2896](#2896) [`7919934`](7919934) Thanks [@miguelg719](https://github.com/miguelg719)! - Snapshot references remain valid across same-origin and out-of-process frame captures - [#2978](#2978) [`f3543d3`](f3543d3) Thanks [@seanmcguire12](https://github.com/seanmcguire12)! - Fix locator failures when entering loading iframes, and correctly target iframe elements when an XPath ends at the iframe. - [#3033](#3033) [`1562d35`](1562d35) Thanks [@seanmcguire12](https://github.com/seanmcguire12)! - add per-call locator timeouts across TypeScript, Python, & Go. one timeout covers frame readiness, element lookup, & execution, including typing delays & highlight duration. the default is 20 seconds. setting timeout to 0 disables it. - [#3146](#3146) [`7d8dcef`](7d8dcef) Thanks [@seanmcguire12](https://github.com/seanmcguire12)! - Make selector waits include frame readiness in their timeout, support unlimited waits with `timeout: 0`, and clean up observers when the wait ends. - [#3052](#3052) [`70f4e91`](70f4e91) Thanks [@seanmcguire12](https://github.com/seanmcguire12)! - Match native XPath semantics for `text()` predicates when a shadow root routes locators through the composed-tree parser ## @browserbasehq/[email protected] ### Minor Changes - [#3030](#3030) [`34edfa3`](34edfa3) Thanks [@supremeboxlogos](https://github.com/supremeboxlogos)! - Export browser pages as PDF bytes in TypeScript, Python, and Go, with configurable print settings and timeouts, and optional local file saving in TypeScript and Python. - [#3083](#3083) [`666b6fa`](666b6fa) Thanks [@seanmcguire12](https://github.com/seanmcguire12)! - expose a timeout option for page.snapshot() across all sdks, defaulting to 20 seconds. set it to 0 for unlimited execution. one budget covers the whole snapshot capture. - [#2916](#2916) [`476658b`](476658b) Thanks [@seanmcguire12](https://github.com/seanmcguire12)! - add page level hooks for webmcp tools added and webmcp tools removed events. ### Patch Changes - [#3045](#3045) [`4da1a21`](4da1a21) Thanks [@github-actions](https://github.com/apps/github-actions)! - Keep telemetry disabled unless an OTLP traces endpoint is explicitly configured. - [#3033](#3033) [`1562d35`](1562d35) Thanks [@seanmcguire12](https://github.com/seanmcguire12)! - add per-call locator timeouts across TypeScript, Python, & Go. one timeout covers frame readiness, element lookup, & execution, including typing delays & highlight duration. the default is 20 seconds. setting timeout to 0 disables it. ## @browserbasehq/[email protected] ### Minor Changes - [#3030](#3030) [`34edfa3`](34edfa3) Thanks [@supremeboxlogos](https://github.com/supremeboxlogos)! - Export browser pages as PDF bytes in TypeScript, Python, and Go, with configurable print settings and timeouts, and optional local file saving in TypeScript and Python. - [#3123](#3123) [`100e201`](100e201) Thanks [@miguelg719](https://github.com/miguelg719)! - Add `ClientOptions` to `LaunchBrowserbase` and `ConnectBrowserbase`. - [#3083](#3083) [`666b6fa`](666b6fa) Thanks [@seanmcguire12](https://github.com/seanmcguire12)! - expose a timeout option for page.snapshot() across all sdks, defaulting to 20 seconds. set it to 0 for unlimited execution. one budget covers the whole snapshot capture. - [#3140](#3140) [`f2060a6`](f2060a6) Thanks [@seanmcguire12](https://github.com/seanmcguire12)! - automatically discover Stagehand extensions when connecting to browsers. deprecate & ignore extension IDs passed into .connect(). - [#2916](#2916) [`476658b`](476658b) Thanks [@seanmcguire12](https://github.com/seanmcguire12)! - add page level hooks for webmcp tools added and webmcp tools removed events. ### Patch Changes - [#3045](#3045) [`4da1a21`](4da1a21) Thanks [@github-actions](https://github.com/apps/github-actions)! - Keep telemetry disabled unless an OTLP traces endpoint is explicitly configured. - [#2896](#2896) [`7919934`](7919934) Thanks [@miguelg719](https://github.com/miguelg719)! - Snapshot references remain valid across same-origin and out-of-process frame captures - [#2978](#2978) [`f3543d3`](f3543d3) Thanks [@seanmcguire12](https://github.com/seanmcguire12)! - Fix locator failures when entering loading iframes, and correctly target iframe elements when an XPath ends at the iframe. - [#3033](#3033) [`1562d35`](1562d35) Thanks [@seanmcguire12](https://github.com/seanmcguire12)! - add per-call locator timeouts across TypeScript, Python, & Go. one timeout covers frame readiness, element lookup, & execution, including typing delays & highlight duration. the default is 20 seconds. setting timeout to 0 disables it. - [#3146](#3146) [`7d8dcef`](7d8dcef) Thanks [@seanmcguire12](https://github.com/seanmcguire12)! - Make selector waits include frame readiness in their timeout, support unlimited waits with `timeout: 0`, and clean up observers when the wait ends. - [#3052](#3052) [`70f4e91`](70f4e91) Thanks [@seanmcguire12](https://github.com/seanmcguire12)! - Match native XPath semantics for `text()` predicates when a shadow root routes locators through the composed-tree parser ## @browserbasehq/[email protected] ### Minor Changes - [#3030](#3030) [`34edfa3`](34edfa3) Thanks [@supremeboxlogos](https://github.com/supremeboxlogos)! - Export browser pages as PDF bytes in TypeScript, Python, and Go, with configurable print settings and timeouts, and optional local file saving in TypeScript and Python. - [#3118](#3118) [`a837acf`](a837acf) Thanks [@miguelg719](https://github.com/miguelg719)! - Add `client_options` to `browserbase.launch()` and `browserbase.connect()`. - [#3083](#3083) [`666b6fa`](666b6fa) Thanks [@seanmcguire12](https://github.com/seanmcguire12)! - expose a timeout option for page.snapshot() across all sdks, defaulting to 20 seconds. set it to 0 for unlimited execution. one budget covers the whole snapshot capture. - [#3140](#3140) [`f2060a6`](f2060a6) Thanks [@seanmcguire12](https://github.com/seanmcguire12)! - automatically discover Stagehand extensions when connecting to browsers. deprecate & ignore extension IDs passed into .connect(). - [#2916](#2916) [`476658b`](476658b) Thanks [@seanmcguire12](https://github.com/seanmcguire12)! - add page level hooks for webmcp tools added and webmcp tools removed events. ### Patch Changes - [#3045](#3045) [`4da1a21`](4da1a21) Thanks [@github-actions](https://github.com/apps/github-actions)! - Keep telemetry disabled unless an OTLP traces endpoint is explicitly configured. - [#2978](#2978) [`f3543d3`](f3543d3) Thanks [@seanmcguire12](https://github.com/seanmcguire12)! - Fix locator failures when entering loading iframes, and correctly target iframe elements when an XPath ends at the iframe. - [#3033](#3033) [`1562d35`](1562d35) Thanks [@seanmcguire12](https://github.com/seanmcguire12)! - add per-call locator timeouts across TypeScript, Python, & Go. one timeout covers frame readiness, element lookup, & execution, including typing delays & highlight duration. the default is 20 seconds. setting timeout to 0 disables it. - [#3146](#3146) [`7d8dcef`](7d8dcef) Thanks [@seanmcguire12](https://github.com/seanmcguire12)! - Make selector waits include frame readiness in their timeout, support unlimited waits with `timeout: 0`, and clean up observers when the wait ends. - [#3052](#3052) [`70f4e91`](70f4e91) Thanks [@seanmcguire12](https://github.com/seanmcguire12)! - Match native XPath semantics for `text()` predicates when a shadow root routes locators through the composed-tree parser ## @browserbasehq/[email protected] ### Patch Changes - Updated dependencies [[`34edfa3`](34edfa3), [`a837acf`](a837acf), [`4da1a21`](4da1a21), [`5802f59`](5802f59), [`819db28`](819db28), [`0210688`](0210688), [`666b6fa`](666b6fa), [`f3543d3`](f3543d3), [`f2060a6`](f2060a6), [`1562d35`](1562d35), [`7d8dcef`](7d8dcef), [`476658b`](476658b), [`70f4e91`](70f4e91)]: - @browserbasehq/[email protected] - @browserbasehq/[email protected] ## @browserbasehq/[email protected] ### Patch Changes - Updated dependencies []: - @browserbasehq/[email protected] ## @browserbasehq/[email protected] ### Patch Changes - Updated dependencies []: - @browserbasehq/[email protected] - @browserbasehq/[email protected] ## @browserbasehq/[email protected] ### Patch Changes - Updated dependencies [[`34edfa3`](34edfa3), [`a837acf`](a837acf), [`4da1a21`](4da1a21), [`5802f59`](5802f59), [`819db28`](819db28), [`0210688`](0210688), [`666b6fa`](666b6fa), [`f3543d3`](f3543d3), [`f2060a6`](f2060a6), [`1562d35`](1562d35), [`7d8dcef`](7d8dcef), [`476658b`](476658b), [`70f4e91`](70f4e91)]: - @browserbasehq/[email protected] - @browserbasehq/[email protected] ## @browserbasehq/[email protected] ### Patch Changes - Updated dependencies []: - @browserbasehq/[email protected] - @browserbasehq/[email protected] ## @browserbasehq/[email protected] ### Patch Changes - Updated dependencies []: - @browserbasehq/[email protected] ## @browserbasehq/[email protected] ### Patch Changes - Updated dependencies [[`34edfa3`](34edfa3), [`a837acf`](a837acf), [`4da1a21`](4da1a21), [`5802f59`](5802f59), [`819db28`](819db28), [`0210688`](0210688), [`666b6fa`](666b6fa), [`f3543d3`](f3543d3), [`f2060a6`](f2060a6), [`1562d35`](1562d35), [`7d8dcef`](7d8dcef), [`476658b`](476658b), [`70f4e91`](70f4e91)]: - @browserbasehq/[email protected] ## @browserbasehq/[email protected] ### Patch Changes - Updated dependencies []: - @browserbasehq/[email protected] - @browserbasehq/[email protected] ## @browserbasehq/[email protected] ### Patch Changes - Updated dependencies []: - @browserbasehq/[email protected] ## @browserbasehq/[email protected] ### Patch Changes - Updated dependencies []: - @browserbasehq/[email protected] ## @browserbasehq/[email protected] ### Patch Changes - Updated dependencies []: - @browserbasehq/[email protected] ## @browserbasehq/[email protected] ### Patch Changes - Updated dependencies []: - @browserbasehq/[email protected] ## @browserbasehq/[email protected] ### Patch Changes - Updated dependencies [[`34edfa3`](34edfa3), [`a837acf`](a837acf), [`4da1a21`](4da1a21), [`5802f59`](5802f59), [`819db28`](819db28), [`0210688`](0210688), [`666b6fa`](666b6fa), [`f3543d3`](f3543d3), [`f2060a6`](f2060a6), [`1562d35`](1562d35), [`7d8dcef`](7d8dcef), [`476658b`](476658b), [`70f4e91`](70f4e91)]: - @browserbasehq/[email protected] - @browserbasehq/[email protected] ## @browserbasehq/[email protected] ### Patch Changes - Updated dependencies []: - @browserbasehq/[email protected] ## @browserbasehq/[email protected] ### Patch Changes - Updated dependencies []: - @browserbasehq/[email protected] ## @browserbasehq/[email protected] ### Patch Changes - Updated dependencies [[`34edfa3`](34edfa3), [`a837acf`](a837acf), [`4da1a21`](4da1a21), [`5802f59`](5802f59), [`819db28`](819db28), [`0210688`](0210688), [`666b6fa`](666b6fa), [`f3543d3`](f3543d3), [`f2060a6`](f2060a6), [`1562d35`](1562d35), [`7d8dcef`](7d8dcef), [`476658b`](476658b), [`70f4e91`](70f4e91)]: - @browserbasehq/[email protected] - @browserbasehq/[email protected] ## @browserbasehq/[email protected] ### Patch Changes - Updated dependencies []: - @browserbasehq/[email protected] ## @browserbasehq/[email protected] ### Patch Changes - Updated dependencies []: - @browserbasehq/[email protected] --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Miguel <[email protected]>
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
page.snapshot()had no timeout param, nor did some of its internal helpers. the helpers that it calls are also called by other functions in the codebase that require timeout handling. this PR wires theprogressobject through the shared downstream helpers, and also exposes a user facingtimeoutparam inpage.snapshot()what changed
0keeps snapshots unlimited.test plan
capture.test.tschecks public & inherited deadlines, unlimited snapshots, expiry preventing further reads or fallback, & cleanup of ignored elements.domTree.test.ts&a11yTree.test.tscheck that expired reads cannot retry or fall back, including when the deadline timer has not fired yet.focusSelectors.test.tschecks that both selector lookup paths release element references returned after timeout. focused accessibility tests also check reference cleanup after successful reads.Summary by cubic
Adds an optional
timeoutparam topage.snapshot()so callers can bound the entire snapshot operation. Omitted timeouts now default to 20 seconds instead of running unlimited.timeoutin the TypeScript, Python, and Go SDKs; passing0keeps snapshots unlimited.Written for commit 4054cdb. Summary will update on new commits.