- Updated the logging messages for dropdown options to be more concise and clear.
- Adjusted error messages in the Tools class to reflect the action of typing text instead of inputting it, enhancing clarity in debugging logs.
- Added functionality to enable the Page domain for dialog events in the PopupsWatchdog, improving dialog management.
- Implemented a small delay for dialog dismissal in DefaultActionWatchdog to ensure smoother interactions.
- Updated logging to provide clearer feedback on dialog handling success and failures, including session identifiers for better traceability.
- Introduced `get_target_id_from_session_id` method in `BrowserSession` to facilitate lookup of target IDs from CDP session IDs.
- Updated `DownloadsWatchdog` to register a global network response callback, improving detection of downloadable content.
- Enhanced error handling and logging for network response events to ensure better tracking of downloads and potential issues.
These changes aim to improve the reliability and functionality of session management and download monitoring in the browser automation framework.
Increased timeouts in DefaultActionWatchdog to handle slow-loading
SPAs and dynamic content more reliably:
- Click element fallback: 3.0s → 10.0s (line 126)
- Mouse press event: 1.0s → 3.0s (line 496)
- Mouse release event: 3.0s → 5.0s (line 516)
Analysis of 15,639 benchmark tests showed 1,262 failures (8.1%) due
to input timeouts. This change is expected to resolve ~900 of those
failures, improving overall pass rate from 66.3% to ~72%.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Introduced new HTML templates for DOM serializer tests, including a main page and an iframe template.
- Enhanced logging in the BrowserSession to provide clearer insights when fetching the CDP client for target nodes, improving traceability during debugging.
- Updated tests to utilize the new HTML templates, ensuring better structure and maintainability.
This update aims to enhance the robustness of the DOM serializer tests and improve error handling in session management.
- Enhanced error handling when fetching the CDP client for a target node.
- Updated log message to include a warning with the last four characters of the target ID for better traceability.
- Ensured fallback to the main session is clearly indicated in the logs.
This change aims to provide clearer insights during debugging and improve the robustness of the session management.
Added two convenience methods for finding element indices:
- get_index_by_id: Find element by its id attribute
- get_index_by_class: Find element by class name
These methods simplify common DOM element lookup patterns when
working with selector maps.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Fixes dropdown selections not persisting in Vue.js, React, and other
reactive frameworks. The issue was that only 'change' events were
dispatched, but Vue's v-model requires 'input' events to register changes.
**Root Cause:**
Dropdown selection handler only dispatched 'change' events, missing the
'input' event required by reactive frameworks.
**Solution:**
Enhanced event dispatching sequence in default_action_watchdog.py:
1. Focus element first
2. Set value and selected state
3. Dispatch 'input' event (critical for Vue v-model and React)
4. Dispatch 'change' event (standard for select elements)
5. Blur element for validation
**Tests:**
Added comprehensive integration tests in tests/ci/interaction/:
- test_dropdown_vue_submit.py: Vue.js 3 with v-model
- test_dropdown_react_submit.py: React 18 with controlled components
Both tests verify dropdown selections persist through the reactive
framework's state management and form submission works correctly.
Closes#3415🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>