Commit Graph

664 Commits

Author SHA1 Message Date
Nick Sweeting af0697f12b fix tests and other improvements 2025-07-08 02:41:48 -07:00
Nick Sweeting b2a84b2296 fix tests and other improvements 2025-07-08 02:32:03 -07:00
mertunsall 2d017ceb2c auto download pdfs on chrome viewer 2025-07-08 11:24:42 +02:00
Nick Sweeting 9b552ee8ac test and telemetry fixes 2025-07-08 01:37:47 -07:00
Nick Sweeting 5e03a961df silence noisy warnings 2025-07-08 01:22:43 -07:00
Nick Sweeting 5171916bb4 fix har recording and logging tests 2025-07-08 01:12:10 -07:00
Nick Sweeting 1b9f7253f0 fix tests and simplify pid detection 2025-07-08 00:56:25 -07:00
Nick Sweeting d9b20d873a tweak launch detection 2025-07-08 00:38:19 -07:00
Nick Sweeting 45bf9815a5 fix cookies errors in tests and launch pid detection 2025-07-08 00:37:46 -07:00
Nick Sweeting c8635de6e1 wait for browser to start 2025-07-07 23:05:18 -07:00
Nick Sweeting bdcaa9acfe auto-use separate temp dir when conflict is detected 2025-07-07 23:05:18 -07:00
Nick Sweeting 6f9a4714af Potential fix for code scanning alert no. 72: Binding a socket to all network interfaces
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2025-07-08 01:48:19 -04:00
Nick Sweeting 3dfb6f8d14 always use CDP for local browser instead of playwright 2025-07-07 22:44:39 -07:00
Nick Sweeting 9e9cce40f6 simplify error logging and fix timeouts 2025-07-07 21:29:03 -07:00
Nick Sweeting 983696aed1 Merge branch 'main' into mcp-server 2025-07-07 17:07:53 -07:00
Nick Sweeting 302a69775a Merge branch 'main' into mcp-server 2025-07-07 12:29:39 -07:00
Daniel T. c5a3c0cf2e Refines dynamic page state calculations
Replaces static page statistics with dynamic calculations for
viewport and scroll position metrics. Simplifies code logic in
scroll handling by removing unnecessary defaults for page
scrolling. Improves readability and reliability of page
scroll operations by requiring explicit num_pages parameter.

Enhances page-view consistency and user interaction handling.
2025-07-07 21:22:12 +02:00
Magnus Müller 3f34c97091 refector agent method 2025-07-07 19:55:35 +02:00
Daniel T. 55c392a8a3 Merge remote-tracking branch 'upstream/main' into enhancement/improved-scroll-action 2025-07-07 19:04:35 +02:00
Daniel T. 92bd24f1a0 Standardizes string quotes and cleans up whitespace
Replaces double quotes with single quotes for consistency in
string declarations. Removes unnecessary trailing whitespace
across various files to improve code readability and maintain
a uniform style.
2025-07-07 18:57:30 +02:00
Daniel T. bf878db2ab Enhances page info in browser state
Adds comprehensive page information including viewport and total
page dimensions, detailed scroll position, and page statistics.
Updates message prompts to utilize this data, improving content
presentation and potential user actions.

Relates to enhanced scrolling feature.
2025-07-07 18:47:50 +02:00
Magnus Müller d3496874db Update test 2025-07-07 16:01:09 +02:00
Magnus Müller b87bebdfc9 Use screenshot from main 2025-07-07 14:15:10 +02:00
Magnus Müller 99d59aedcd Enhance screenshot handling and process management in BrowserSession
- Updated retry parameters for screenshot attempts to allow longer wait times and more retries.
- Added cleanup logic for conflicting browser processes in CI environments to prevent session conflicts.
- Improved error handling for browser session conflicts by retrying with a fresh user data directory.
- Increased timeout for page load state to ensure better reliability during loading operations.
2025-07-07 13:57:48 +02:00
Magnus Müller 292b5972d6 Refactor observability logging and simplify decorator usage
- Commented out logging statements in `_is_debug_mode` to reduce verbosity.
- Simplified the usage of `@observe_debug` and `_lmnr_observe` decorators in `BrowserSession` by consolidating arguments into a single `kwargs` dictionary for better readability and maintainability.
2025-07-07 13:20:05 +02:00
Magnus Müller 5bde6dbe98 Enhance observability by adding debug observation points in browser profile and session classes
- Added `@observe_debug` decorators to methods in `BrowserProfile` and `BrowserSession` to track display configuration, connection methods, and setup processes.
- Updated `eval/service.py` to initialize Laminar with specific disabled instruments and corrected the usage of the `observe` decorator for the `run_agent_with_browser` function.
2025-07-07 12:55:22 +02:00
Nick Sweeting 6ad5c223f0 fix type errors and add timeout on remove_highlights 2025-07-07 00:25:24 -07:00
Magnus Müller ef36632ccf Refactor observability imports to maintain consistency across modules 2025-07-05 23:12:05 +02:00
Magnus Müller a4c9b992ba Add observability module for browser-use with optional lmnr integration and debug mode support 2025-07-05 23:08:00 +02:00
Magnus Müller 0dc84c4897 Remove waiting from go_to_url since we wait later when we get the new state 2025-07-05 17:39:35 +02:00
Magnus Müller 941a6a8693 Add try block around page.title() in create_new_tab to prevent crashes 2025-07-05 17:23:20 +02:00
Magnus Müller ffc12552fa Recover on broken pages with new tab 2025-07-05 17:10:54 +02:00
Magnus Müller 09d336556f Update error logging to not confuese agent when site is not available 2025-07-05 16:03:27 +02:00
Magnus Müller b73ea2fa5b lmnr tracking 2025-07-05 15:46:15 +02:00
Magnus Müller 99ef62748f Add lmnr tracing 2025-07-05 15:23:38 +02:00
Magnus Müller face6a599b Enhance observability in browser and agent services
- Added `@observe` decorators to various methods in `service.py`, `session.py`, and `controller.py` to improve tracking of actions and state changes.
- Updated method signatures to include observability features for better debugging and monitoring.
- Adjusted retry logic for certain actions to enhance reliability and performance.
2025-07-05 14:44:43 +02:00
Magnus Müller a030a2dc1d Use default retry for screenshots 2025-07-05 10:26:02 +02:00
Magnus Müller 669f9d8de3 Remove retry because of duplicate 2025-07-05 10:21:14 +02:00
Magnus Müller 67437789b7 Change page.is_closed to page.evaluate('1') 2025-07-05 10:10:22 +02:00
Magnus Müller dccff73b17 refactor: adjust timeouts for step execution and retry logic
- Increased step execution timeout from 60 seconds to 120 seconds for improved handling of longer operations.
- Reduced retry attempts in the screenshot logic from 3 to 2 to streamline error handling and reduce unnecessary retries.
2025-07-04 17:30:48 +02:00
Magnus Müller c8ddbb7d6d Logging & timeouts 2025-07-04 15:35:06 +02:00
Magnus Müller 22f89efae4 refactor: reduce timeouts for various operations to improve responsiveness
- Updated timeouts for action execution, step processing, and screenshot operations to more aggressive values (e.g., reduced from 60s to 20s for actions, 30s to 10s for DOM processing).
- Adjusted retry logic and timeout settings for screenshot and iframe content extraction to enhance performance and reduce potential hangs.
- Improved logging for timeout events to provide clearer feedback on operation failures.
2025-07-04 14:30:54 +02:00
Magnus Müller 6be3ad952f Merge remote-tracking branch 'origin/main' into fix-browser-error-recovery 2025-07-04 14:26:48 +02:00
Magnus Müller ee7d6da250 Implement timeout protections for DOM processing and screenshot operations
- Added timeout handling for DOM element extraction with a 30-second limit, logging a warning on timeout.
- Introduced a 10-second timeout for screenshot operations, with a warning logged if the operation exceeds this duration.
- Adjusted existing timeout values for screenshot retries and page load state to improve responsiveness.
2025-07-04 13:43:21 +02:00
Magnus Müller 62b298790e better screenshot timeout handling 2025-07-04 11:47:28 +02:00
Magnus Müller 1200583f64 Fix debug message in BrowserSession to clarify page accessibility error 2025-07-03 20:23:32 +02:00
Cursor Agent bd776c6e60 Fix tab info retrieval to preserve real URLs and improve LLM context
Co-authored-by: mamagnus00 <mamagnus00@gmail.com>
2025-07-01 21:53:04 +00:00
Nick Sweeting 6a5e86204b speed up screenshot tweaks 2025-07-01 01:42:28 -07:00
Nick Sweeting d9943ef336 tweak emojij 2025-07-01 00:41:49 -07:00
Nick Sweeting 6170953b5e disable screenshot clipping entirely for now 2025-06-30 23:47:20 -07:00