Repository navigation
Reuse browser session setup across locator calls - #3420
arunjmoorthy wants to merge 1 commit into
Conversation
🦋 Changeset detectedLatest commit: 554f3dc The changes in this PR will be included in the next version bump. This PR includes changesets to release 23 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 |
|
This PR is from an external contributor and must be approved by a stagehand team member with write access before CI can run. |
| "@browserbasehq/stagehand-python": patch | ||
| --- | ||
|
|
||
| Reuse successful DOM and Runtime setup across internal locator operations within a browser session. Failed setup remains retryable, explicit CDP enable and disable commands are still sent, and session teardown clears saved setup. |
There was a problem hiding this comment.
Could we trim this to one user-facing line? Release notes read best when they describe the effect rather than the mechanics:
| Reuse successful DOM and Runtime setup across internal locator operations within a browser session. Failed setup remains retryable, explicit CDP enable and disable commands are still sent, and session teardown clears saved setup. | |
| Speed up repeated locator actions by skipping redundant DOM and Runtime setup calls. |
why
Repeated locator calls send
Runtime.enableandDOM.enableto the same browser session even after setup succeeds. This addresses the repeated setup portion of #3239. #3326 covers logging overhead, and element-handle reuse is a separate part of the issue.what changed
Internal locator operations share each session’s pending or successful setup. A failed request can be retried. Explicit enable and disable commands still reach Chrome and invalidate saved setup for their domain. Session teardown clears the saved state.
test plan
just checkstops on main’s existingagent-discoverability-metadata.mdrelease entry. The release validator accepts this change’s entry. In the broader Python run, 1,093 tests passed, nine were skipped, and four were excluded after a transport test hung during cleanup.Summary by cubic
Internal locator calls now reuse pending or successful
DOM.enableandRuntime.enablesetup within each browser session, avoiding repeated setup commands.Written for commit 554f3dc. Summary will update on new commits.