- Introduced `record_video_framerate` and `record_video_size` parameters to the BrowserSession class for enhanced video recording capabilities.
- Updated example in video_recording.py to reflect changes, switching from BrowserSession to Browser for video recording setup.
This update allows users to customize video recording settings more effectively.
Removed MAX_SCREENSHOT_HEIGHT and MAX_SCREENSHOT_WIDTH constants that were not being used anywhere in the codebase.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Introduced `filter_highlight_ids` option in `BrowserProfile`, `BrowserSession`, and `create_highlighted_screenshot` to control the visibility of element IDs based on text length.
- Updated `draw_enhanced_bounding_box_with_text` to utilize the new filtering logic for enhanced visual clarity.
- Changed the color of text areas from yellow to orange for improved visibility in the UI.
- Eliminated the `display_highlights_on_screen` option from `BrowserProfile` and `BrowserSession` to streamline the highlighting functionality.
- Updated the `draw_enhanced_bounding_box_with_text` function to increase font size for better visibility and reduced padding for a more compact layout.
- Removed associated screenshot overlay logic in `DOMWatchdog` to reflect the removal of the display highlights feature.
- Introduced `display_highlights_on_screen` option in `BrowserProfile` and `BrowserSession` to control the visibility of highlights directly on the browser screen.
- Implemented `draw_enhanced_bounding_box_with_text` function to improve the visual representation of highlighted elements with larger indices and solid borders.
- Updated screenshot overlay logic in `DOMWatchdog` to utilize the new highlighting feature, ensuring better visibility of interactive elements during browser sessions.
- Add on_TabCreatedEvent handler to BrowserSession to apply viewport settings
- Update _cdp_set_viewport to accept optional target_id parameter
- All tabs (initial and new) now get viewport through unified event handler
This ensures consistent viewport configuration across all tabs when
viewport is explicitly set in the browser profile, while respecting
the natural window sizing when viewport is not configured.
Implements _cdp_get_origins() method to capture localStorage and sessionStorage
using cdp-use's typed DOMStorage client. This enables proper session
persistence for applications that store authentication tokens in browser storage
rather than cookies.
- Adds _cdp_get_origins() to enumerate all frames and extract unique origins
- Uses cdp-use's DOMStorage.getDOMStorageItems to retrieve localStorage/sessionStorage
- Updates _cdp_get_storage_state() to include origins in storage state
- Handles errors gracefully with debug logging for individual storage failures
- Uses try-finally to ensure DOMStorage is properly disabled even on errors
- Encapsulates storage extraction logic in helper functions for clarity