stagehand-python@4.2.0a0.dev1562: feat : expose timeout param in page.snapshot() ( 3083)
Stagehand added an optional timeout parameter to page.snapshot() across Python, TypeScript, and Go SDKs, enforcing a unified deadline across internal operations with cleanup on expiration.
原始内容为英文;当前页面提供中文导航与来源说明,具体事实请以原文为准。
为什么值得关注
PR 3083 adds an explicit snapshot timeout in milliseconds to page.snapshot() across TypeScript, Python, and Go SDKs. Previously, snapshot operations and several internal helpers lacked timeout parameters. The implementation wires progress handling through shared downstream helpers, establishing a single deadline that covers frame readiness, element lookup, document and accessibility tree reads, and frame traversal. Internal snapshot calls can reuse a caller's remaining budget rather than initiating a new one. Upon expiry, the system halts retries, fallback reads, and further frame traversal while releasing temporary element references. Passing 0 maintains unlimited snapshot duration, while SDK response wait logic incorporates delivery grace intervals for bounded operations.
可执行摘要
Stagehand prerelease stagehand-python@4.2.0a0.dev1562 introduces an optional timeout argument to page.snapshot() in TypeScript, Python, and Go. The deadline spans frame readiness, element lookup, DOM and accessibility tree reads, and frame traversal, while halting retries and releasing element references upon expiration.
- Agent 实用度
- 77/100
- 可信度
- 96%
- 机器格式
- JSON + Markdown
开发者应核对什么
- Test page.snapshot() calls under high-latency network conditions or complex DOMs using the new timeout parameter.
- Verify whether implicit timeout behaviors (such as a 20-second default mentioned in commit notes vs unlimited omission) affect existing snapshot workflows, setting timeout=0 if unbounded execution is strictly required.