Commit Graph

1260 Commits

Author SHA1 Message Date
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
Magnus Müller
cb920922ea Implement Chrome instance check in LocalBrowserWatchdog
This update adds functionality to the LocalBrowserWatchdog class to check for running Chrome/Chromium instances before launching a new browser. If any instances are detected, a RuntimeError is raised, providing users with instructions on how to close existing Chrome windows. This ensures exclusive control over Chrome for CDP debugging, preventing potential conflicts during browser automation.
2025-10-23 14:17:49 -07:00
Magnus Müller
aa500c9873 Linter 2025-10-21 21:26:10 -07:00
Magnus Müller
699fb347e1 Wait 10s for requests 2025-10-21 21:25:04 -07:00
Magnus Müller
b678f27a3e Migration from highlight index to backendnode id 2025-10-21 21:02:28 -07:00
Magnus Müller
9caa248316 Merge code7 branch changes 2025-10-21 18:55:54 -07:00
Saurav Panda
ee355bf43c Merge branch 'main' into focus-causes-llm-to-not-input-text-properly 2025-10-16 16:59:08 -07:00
Saurav Panda
eb6eee149a fix: Wrapped select() in try-catch to handle input types that don't support text selection 2025-10-16 16:42:18 -07:00
Saurav Panda
48e0cbb784 fixed clear issue when focus fails. 2025-10-16 16:10:48 -07:00
Reagan Hsu
eaad2c7e63 Merge branch 'main' into fix/keyboard-events-complete 2025-10-15 14:18:34 -07:00
Reagan Hsu
659c0ddf42 make new utils file and add get_key_info 2025-10-15 13:48:08 -07:00
Magnus Müller
4c7cf16042 add get_state_as_text 2025-10-15 11:35:24 -07:00
Reagan Hsu
b7ca829032 Apply code style fixes from pre-commit hooks
- Reorganize imports in default_action_watchdog.py
- Remove unused platform import at top level
- Add proper spacing in inline comments
- Reformat function signatures to single line
- Fix import order in play_2048.py

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-13 19:36:06 -07:00
Reagan Hsu
bc0ce8c226 Merge branch 'main' into fix/keyboard-events-complete 2025-10-13 19:29:16 -07:00
Reagan Hsu
e1ff1edb93 import syntax 2025-10-13 19:26:17 -07:00
Reagan Hsu
8b3b117d9e fixed cubic errors 2025-10-13 19:15:32 -07:00
Reagan Hsu
81933bb20c update Page.press() to include event code and windowsVirtualKeyCode
removed invalid filter param in attachToTarget()

added more keys and better parsing for lowercase keys using get_key_info() to make sure that key presses are properly processed
2025-10-13 18:34:30 -07:00
Magnus Müller
c9e2886e13 wait between actions to 0.1 2025-10-12 17:09:51 -07:00
Magnus Müller
f6fa2a42f3 Remove wait after click 2025-10-12 17:01:49 -07:00
Magnus Müller
1f434bf6ad Linter 2025-10-12 16:19:41 -07:00
Magnus Müller
4078b6e265 Remove while_holding_ctrl logic in click 2025-10-12 16:11:09 -07:00
Magnus Müller
9421b59ee5 Switch tabs 2025-10-12 16:06:25 -07:00
Magnus Müller
8fe1f65229 Remove tab switching from click 2025-10-12 15:58:42 -07:00
Magnus Müller
846e0c89f6 Force background tab extension 2025-10-12 15:57:58 -07:00
Magnus Müller
6568a4061f Remove activateTarget 2025-10-11 18:28:24 -07:00
Magnus Müller
3d92c2061a Default wait between actions 0.25 2025-10-11 17:27:46 -07:00
Magnus Müller
53ec92fc36 Remove colours from watchdog logs 2025-10-11 17:21:56 -07:00
Magnus Müller
e30150acd7 Improve error 2025-10-11 16:54:16 -07:00
Magnus Müller
e643d3d5ae use contains for on top check 2025-10-11 16:45:38 -07:00
Magnus Müller
726301f3fc For input also make sure its the top element 2025-10-11 16:32:33 -07:00
Magnus Müller
ba11fff383 Check if element is top layer -> else js click 2025-10-11 16:25:14 -07:00
Magnus Müller
dedd0db977 Not double parallel 2025-10-11 16:10:01 -07:00
Magnus Müller
8c4b7210fb Scroll first - then get coords 2025-10-11 16:05:37 -07:00
Magnus Müller
dc1901740e Input get coords update 2025-10-11 16:03:14 -07:00
Magnus Müller
40a591e4d2 Default function to get coords by backendnode id 2025-10-11 15:48:32 -07:00
Magnus Müller
b665d2bb85 Include scroll 2025-10-09 12:27:51 -07:00
Magnus Müller
02986c7d88 Offset 2025-10-09 11:58:15 -07:00
Magnus Müller
d0d732d48c Fly in highlights 2025-10-09 11:56:13 -07:00
Magnus Müller
e283d913ef Default orange 2025-10-09 11:45:41 -07:00
Magnus Müller
1086a5634c Init 2025-10-09 11:44:07 -07:00
kalil0321
99c9beb3ce Merge branch 'main' into previous-highlighting 2025-10-08 23:04:59 +02:00
Magnus Müller
6d941a5dcc Rename Clear existing to clear 2025-10-05 19:32:39 -07:00
Magnus Müller
324ac74204 Linter 2025-10-05 19:21:12 -07:00
Magnus Müller
b53a7c116a Update outdated function names 2025-10-05 19:12:52 -07:00
Magnus Müller
ee29003fa5 less-quality-image 2025-10-03 21:10:10 -07:00
mertunsall
b154d906c7 fix tests 2025-10-04 02:15:32 +02:00