You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* feat: don't close new opened tabs (#161)
* feat: port new page handling from JS Stagehand PR #844
- Add live page proxy that dynamically tracks the focused page
- Implement context event listener to initialize new pages automatically
- Remove automatic tab closing behavior in act_handler_utils and cua_handler
- Keep both original and new tabs open when new pages are created
- Ensure stagehand.page always references the current active page
This implementation matches the behavior of browserbase/stagehand#844
* Update stagehand/handlers/cua_handler.py
* Update stagehand/handlers/act_handler_utils.py
---------
Co-authored-by: Arun Patro <[email protected]>
Co-authored-by: Miguel <[email protected]>
* formatting, logs
* changeset
* fix: update mock_stagehand_client fixture to set internal page properties
The page property is now read-only (returns LivePageProxy), so tests need to set the internal _original_page and _active_page properties instead
* feat: add page stability check to LivePageProxy for async operations
Ensures async operations wait for any pending page switches to complete
* formatting
* fix: prevent deadlock in page navigation and add page stability tests
- Initialize _page_switch_lock in Stagehand constructor
- Skip page stability check for navigation methods (goto, reload, go_back, go_forward)
- Use lock when switching active pages in context
- Add comprehensive tests for LivePageProxy functionality
* consolidate original and active page to just one page
* Update stagehand/context.py
* Update .changeset/gorilla-of-strongest-novelty.md
* timeouts
* python 3.10 or less compatibility
---------
Co-authored-by: Arun Patro <[email protected]>
Co-authored-by: Arun Patro <[email protected]>
Co-authored-by: Filip Michalsky <[email protected]>
0 commit comments