Commit Graph

275 Commits

Author SHA1 Message Date
Laith Weinberger 03e2bc4da8 prefer Playwright chromium over sys Chrome by default 2026-04-12 11:41:50 -04:00
Laith Weinberger 534eaafe7a clear dom cache after scroll to prevent stale extract data 2026-04-11 18:03:06 -04:00
MagMueller 3aa68384ad style: use TimeoutError instead of asyncio.TimeoutError (py3.11+) 2026-04-01 21:54:58 -07:00
MagMueller dcc7e691c4 fix: add 2s timeout to pending network request check in DOM watchdog
On slow CI machines, _get_pending_network_requests() can hang for 15s+
when Chrome is busy loading/rendering after a navigation. This silently
eats into the 30s BrowserStateRequestEvent budget, leaving insufficient
time for the actual DOM capture — causing 5 consecutive timeouts and
agent termination.

Observed on eBay search results in eval runs: DOMWatchdog started but
produced zero log output for 15 seconds before the timeout killed it.
The pending network check was the first await after the URL log.
2026-04-01 21:40:06 -07:00
Laith Weinberger 393d2c5b0f rm pass 2026-03-25 16:56:36 -04:00
Saurav Panda 4a65aea6a9 Merge branch 'main' into auto-switch-new-tab 2026-03-21 17:17:32 -07:00
Saurav Panda e7a05cbe86 fix: auto-switch to new tabs after click and add checkbox toggle fallback
- AGI-569: after any click that opens a new tab, automatically dispatch
  SwitchTabEvent so the agent lands on the new page immediately instead
  of requiring a manual switch step (~877 occurrences)

- AGI-548: for <input type="checkbox/radio">, capture checked state
  before the CDP mouse click and verify it toggled afterward; if
  unchanged (custom-styled or shadow-DOM-backed inputs), fall back to
  JS element.click() and report the final checked state in metadata
  (~1,241 occurrences)
2026-03-20 12:43:58 -07:00
Saurav Panda c0b2fc1210 prevent highlight cleanup from blocking 2026-03-16 17:46:42 -07:00
Saurav Panda f8c729d468 fix(browser): prevent remove_highlights() from blocking screenshot handler on slow pages 2026-03-16 10:05:53 -07:00
Saurav Panda 2344df3fac fix: pass through timeout_ms and clip params in event handlers 2026-03-07 14:34:08 -08:00
Laith Weinberger f5df080b41 lint 2026-03-01 16:21:49 -05:00
Laith Weinberger 209866ed5b fix channel param to select correct browser binary 2026-03-01 16:17:18 -05:00
Laith Weinberger 8ebe4385ed fix: preserve non-ASCII chars in all remaining JSON file outputs 2026-03-01 14:19:38 -05:00
laithrw 744c2be4ae Merge branch 'main' into issue-3523-fix 2026-02-26 21:05:37 -05:00
Aitor f60a62bc76 Merge branch 'main' into feat/add-captcha-solver-handling 2026-02-24 07:13:06 +01:00
Saurav Panda 84babc6b75 fix radio button click occlusion when label overlaps input 2026-02-23 16:19:05 -08:00
reformedot 45e9a6cea3 chore: linting 2026-02-23 11:03:14 -08:00
reformedot b4058359a9 refactor: enhance CaptchaWatchdog with typed event handling and result types
- Introduced type aliases for captcha results to improve clarity and maintainability.
- Updated event handler signatures to use specific event types from the CDP module.
- Ensured consistent typing for captcha result attributes within the CaptchaWaitResult class.
- Added assertion for timeout handling in the captcha waiting logic.
2026-02-23 10:57:48 -08:00
reformedot ed28e50806 feat: added automatic captcha solver handling via CAPTCHA watchdog 2026-02-23 10:51:02 -08:00
LarsenCundric c67c31932e Fix 2026-02-20 10:57:00 -08:00
Laith Weinberger 4b81a4212d fix(storage_state): typing + format cleanup 2026-02-18 14:37:20 -05:00
Laith Weinberger 6db6678a83 style: format downloads_watchdog 2026-02-16 17:36:10 -05:00
Laith Weinberger 0536f5808c Merge origin/main into fix-minimal-issue-7JLZB 2026-02-16 17:33:02 -05:00
Laith Weinberger c6c431c95d fix(#3515): avoid stale download caches 2026-02-16 17:32:12 -05:00
Laith Weinberger fa51754895 fix(storage_state): await restore, normalize session cookies, scope storage to origin 2026-02-14 13:23:10 -05:00
Saurav Panda 4857d190e3 comment linting issue 2026-02-11 15:01:25 -08:00
Saurav Panda 30dbf9e535 fix: retry select_dropdown when options are lazily populated 2026-02-10 18:50:05 -08:00
laithrw 9d81f64b2e Merge branch 'main' into kalil0321/har_watchdog 2026-02-04 21:17:10 -05:00
Saurav Panda 5d7ff041d3 improved concatenation heuristic 2026-02-03 18:02:58 -08:00
Saurav Panda 2a5768f3da fixed pyright issues 2026-02-03 13:02:03 -08:00
Saurav Panda 749fa56d1a improve text field handling 2026-02-03 12:52:56 -08:00
laithrw a8ce4a2a43 Merge branch 'main' into wait-file-download 2026-01-31 18:22:30 -05:00
Laith Weinberger bdecd06e3e lint 2026-01-31 18:10:51 -05:00
Laith Weinberger 84b460d6ce replace wait for download action w automatic wait listener 2026-01-31 18:02:29 -05:00
laithrw 2c8b761d49 Merge branch 'main' into leafstart-bug 2026-01-31 16:14:28 -05:00
Saurav Panda 5524c986e5 Merge branch 'main' into fix/increase-max-memory-length 2026-01-30 16:35:13 -08:00
Saurav Panda 6878bd1ca4 handle autocomplete fields 2026-01-30 11:04:00 -08:00
Magnus Müller e072135590 fix: add file validation for uploads and dynamic text extension list
- Add 0-byte file check in upload_file handler to catch empty files early
  with a clear error message instead of silently passing them to websites
- Add 0-byte file check in CDP upload watchdog before setFileInputFiles
  to prevent uploading empty files that cause cascading failures
- Replace hardcoded text extension list in read_file_structured() with
  dynamic derivation from _file_types, so new text-based file types
  are automatically supported for external file reading

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 00:25:36 -08:00
Laith Weinberger 150e99db8e lint 2026-01-28 19:08:24 -05:00
Laith Weinberger fc293f83e7 generalize leaf start fix 2026-01-28 19:04:24 -05:00
laithrw c62ceafa25 Merge branch 'main' into fix/3889-draftjs-first-char 2026-01-26 19:51:08 -05:00
Laith Weinberger ca049c67a1 clean comments 2026-01-26 19:28:45 -05:00
laithrw 7cf8575e4a Merge branch 'main' into main 2026-01-26 15:24:11 -05:00
zhongzhenyu b1fad345d6 style: remove trailing whitespace 2026-01-25 22:05:01 -08:00
zhongzhenyu f13d8246e9 fix: Fix Draft.js space prepending to only apply when clear=True 2026-01-25 21:58:18 -08:00
Laith Weinberger 6f8c077932 lint 2026-01-25 15:49:49 -05:00
Laith Weinberger 64ada81915 fix(#2867): verify dropdown selection and retry if reverted
addresses select_dropdown silently claiming success even when frameworks intercepted and reverted the selection
2026-01-25 15:40:22 -05:00
laithrw d1a53a158e Merge branch 'main' into main 2026-01-25 12:31:43 -05:00
zhongzhenyu c0f4f39570 fix(#3889): Draft.js editors lose first character when typing
CDP's dispatchKeyEvent doesn't trigger beforeinput events that Draft.js
relies on for text input. This causes the first character to be dropped.

Solution: Detect Draft.js editors via specific DOM attributes (DraftEditor
class, data-contents, data-block, data-offset-key) and prepend a sacrifice
space character that Draft.js will drop, preserving the actual text.
2026-01-15 18:13:25 -08:00
kalil0321 49a345fb19 Lint 2025-12-25 18:56:30 +01:00