Commit Graph

1305 Commits

Author SHA1 Message Date
Magnus Müller
4951002ae3 Linter 2025-10-30 11:10:56 -07:00
Magnus Müller
7468ca2e3f Remove old method 2025-10-30 11:08:49 -07:00
Magnus Müller
356183b4c5 Dropdown mesage 2025-10-30 10:11:32 -07:00
Magnus Müller
e5fb13d2ca Wait 1 s after navigation 2025-10-30 10:05:13 -07:00
Magnus Müller
438379aa7b Small fix 2025-10-30 00:47:24 -07:00
Magnus Müller
49cf6cd459 Session fix input breaks 2025-10-30 00:44:44 -07:00
Magnus Müller
fc0fa6f773 Logs 2025-10-30 00:35:05 -07:00
Magnus Müller
d93106fef6 Fix dropdown error 2025-10-30 00:29:43 -07:00
Magnus Müller
7a571f507f Logs 2025-10-30 00:09:57 -07:00
Magnus Müller
a403116905 Logs 2025-10-29 23:53:41 -07:00
Magnus Müller
f8ca1ab3b4 Logs 2025-10-29 23:53:12 -07:00
Magnus Müller
6bfd8bb23c Clear input for other elements 2025-10-29 23:53:05 -07:00
Magnus Müller
0badc5d4cc Date setting update 2025-10-29 21:49:03 -07:00
Magnus Müller
ec7bdbf802 Dropdown fix 2025-10-29 21:34:40 -07:00
Magnus Müller
d0b8469c68 Linter 2025-10-29 21:18:31 -07:00
Magnus Müller
9e93a92ba4 Include popup msg into browser state 2025-10-29 21:18:20 -07:00
Magnus Müller
d8955bc179 Linter 2025-10-29 20:17:36 -07:00
Magnus Müller
f1e3fbcd0c More forms for datepicker 2025-10-29 20:17:20 -07:00
Magnus Müller
04ce92202a Linter 2025-10-29 19:45:46 -07:00
Magnus Müller
b04e8f5773 Fix time inputs 2025-10-29 19:29:46 -07:00
Magnus Müller
ad505378df Refactor dropdown option logging and error messages in DefaultActionWatchdog and Tools classes
- 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.
2025-10-29 18:28:04 -07:00
Magnus Müller
e33393afcf fix-enter 2025-10-29 18:09:59 -07:00
Magnus Müller
8296e430aa Change logs 2025-10-29 16:14:32 -07:00
Magnus Müller
5faba663e2 Enhance dialog handling in watchdogs
- 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.
2025-10-29 14:04:48 -07:00
Magnus Müller
dfc7e32c69 Update click to download pdfs 2025-10-29 13:13:21 -07:00
Magnus Müller
82346f194d Revert "More timeouts"
This reverts commit c401b770fe.
2025-10-29 12:55:51 -07:00
Magnus Müller
c401b770fe More timeouts 2025-10-29 12:46:38 -07:00
Magnus Müller
34cc9ac7da Linter 2025-10-29 12:46:21 -07:00
Magnus Müller
c69dd517ce Do not download images 2025-10-29 12:45:41 -07:00
reformedot
b2b5a260db fix: fixed cubic issues + handle onTabClosed event emission correctly 2025-10-28 18:57:25 -07:00
Aitor
5682f4a993 Merge branch 'main' into feat/improve-session-manager 2025-10-29 02:27:23 +01:00
reformedot
9a0bad39c2 fix: improved session recovery, target type caching & cleaned code 2025-10-28 17:35:04 -07:00
Magnus Müller
00b11e1e27 Add method to retrieve target ID from CDP session ID and enhance DownloadsWatchdog with global network response handling
- 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.
2025-10-27 22:30:53 -07:00
Magnus Müller
d4f9f9f072 Linter 2025-10-27 22:21:34 -07:00
Magnus Müller
2e6db8a135 Improve auto download for inside iframe 2025-10-27 21:46:34 -07:00
Magnus Müller
367cae2195 Merge branch 'main' into fix/increase-interaction-timeouts 2025-10-27 18:36:23 -07:00
Magnus Müller
12caa635b9 Increase interaction timeouts to reduce failures on slow pages
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>
2025-10-27 18:21:18 -07:00
Magnus Müller
3ce813ff2c Merge branch 'main' into test-screenshot 2025-10-27 17:34:03 -07:00
Alezander9
195f1f1f0f address cubic comments 2025-10-27 12:28:06 -07:00
Magnus Müller
4258546098 Add DOM serializer test templates and improve logging
- 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.
2025-10-26 22:44:42 -07:00
Magnus Müller
06d0efc289 Improve logging for CDP client retrieval in BrowserSession
- 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.
2025-10-26 22:26:26 -07:00
reformedot
f0469a8427 fix: fixed "No active exception to reraise" error 2025-10-26 12:15:22 -07:00
reformedot
3a21ce805d fix: don't focus when generating DOMTree in _get_viewport_ratio 2025-10-26 06:42:10 -07:00
reformedot
54e4dacbf9 feat: improved session manager 2025-10-26 06:05:49 -07:00
Gregor Žunič
a3c6fd8025 changed browser use api key creation url everywhere 2025-10-25 10:38:10 -07:00
Magnus Müller
cc250ff87e Add element lookup helper methods to BrowserSession
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>
2025-10-24 19:26:55 -07:00
Magnus Müller
f41da2d3b4 Fix dropdown selection for Vue.js and reactive frameworks (#3415)
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>
2025-10-24 18:54:57 -07:00
Magnus Müller
c4bee3b347 Revert "error-msg-if-chrome-is-running (#3398)"
This reverts commit 739f8410aa, reversing
changes made to 910d5d6767.
2025-10-24 02:37:15 -07:00
Alezander9
112d85c73b address cubic comments of special characters and newlines 2025-10-23 19:20:14 -07:00
Magnus Müller
def2c3e172 Fix 2025-10-23 18:49:08 -07:00