Commit Graph

643 Commits

Author SHA1 Message Date
Magnus Müller
4fda18a564 add if main check to qwen example 2025-09-07 17:02:46 -07:00
Magnus Müller
1380b1e903 qwen support 2025-09-07 16:25:15 -07:00
Magnus Müller
495804389c Refactor download_file example to use updated Browser class
This commit modifies the `download_file.py` example to replace the `BrowserSession` and `BrowserProfile` with the new `Browser` class. The changes streamline the code and enhance clarity by directly utilizing the `Browser` for managing downloads. The download path remains set to a temporary directory for testing purposes.
2025-09-06 15:56:09 -07:00
Magnus Müller
a694501294 Enhance DownloadsWatchdog to expand and resolve download paths
This commit updates the DownloadsWatchdog class to ensure that the downloads directory path is properly expanded and resolved to an absolute path. The changes include:

- Expanding the downloads path using `expanduser()` and `resolve()` methods to handle user home directories correctly.
- Updating the download behavior settings to use the expanded path.
- Ensuring that the downloads directory is created with the resolved path.

Additionally, the example feature for downloading files has been modified to use a temporary downloads path for testing purposes.
2025-09-06 15:53:16 -07:00
Magnus Müller
95ccbe5115 Refine Playwright integration example documentation
This commit updates the Playwright integration example in `playwright_integration.py` to provide a clearer overview of its key features. The previous detailed description has been condensed into a more concise format, highlighting the main functionalities of sharing a Chrome instance via CDP and the ability to perform actions with both Playwright and Browser-Use.

- **Documentation Update**
- Simplified the example description for better clarity and focus on key features.
2025-09-06 15:14:36 -07:00
Magnus Müller
b956c11567 Add advanced Playwright integration example
This commit introduces a new example demonstrating the integration of Playwright with Browser-Use. The example showcases how to start Chrome with CDP enabled, create custom actions for form filling, taking screenshots, and extracting text using Playwright's capabilities. It includes necessary dependency checks and a main function to orchestrate the workflow using an AI agent.

- **New Features**
- Implemented custom actions: `playwright_fill_form`, `playwright_screenshot`, and `playwright_get_text`.
- Added error handling and dependency checks for required libraries.
- Provided detailed documentation within the code for clarity on usage and functionality.
2025-09-06 14:54:52 -07:00
Magnus Müller
6495408168 Ignore input 2025-09-06 14:50:54 -07:00
Magnus Müller
b32a79a063 Merge branch 'main' into added-playwright-browser-use-example 2025-09-06 14:41:17 -07:00
Magnus Müller
be6fd1a92e Add video recording configuration options to BrowserSession
- Introduced `record_video_framerate` and `record_video_size` parameters to the BrowserSession class for enhanced video recording capabilities.
- Updated example in video_recording.py to reflect changes, switching from BrowserSession to Browser for video recording setup.

This update allows users to customize video recording settings more effectively.
2025-09-06 12:29:19 -07:00
Enzo Biondo
1da79ca982 Merge branch 'main' into feat/video-recording 2025-09-06 14:43:33 -03:00
Magnus Müller
698669be63 Merge branch 'main' into fix/gmail_integration_script 2025-09-06 10:25:46 -07:00
Magnus Müller
c3d2f18742 Update agent initialization to suppress type checking warnings
- Added a type ignore comment to the agent initialization line to prevent type checking errors related to the sensitive_data parameter.

This change improves compatibility with type checkers while maintaining code clarity.
2025-09-06 08:41:45 -07:00
Magnus Müller
cd239317d0 Update 2FA example to reflect new sensitive data key
- Changed the key in sensitive_data from '2fa_code' to 'bu_2fa_code' for improved clarity.
- Updated user instructions to align with the new key terminology.

These modifications enhance the consistency and clarity of the 2FA implementation.
2025-09-06 08:38:54 -07:00
Magnus Müller
bf385a3f34 Update 2FA implementation to standardize sensitive data references
- Changed the key in sensitive_data from 'otp_secret' to '2fa_code' for consistency across files.
- Updated instructions in the 2FA example to reflect the new key and improve clarity on user input.

These changes enhance the clarity and maintainability of the 2FA implementation.
2025-09-06 08:38:14 -07:00
Magnus Müller
fce87aa7b7 Refactor 2FA example to enhance clarity and maintainability
- Removed unnecessary logging setup to streamline the code.
- Simplified the definition of sensitive_data by eliminating type annotations.
- Updated comments for better guidance on using the 2FA example.

These changes improve the readability and maintainability of the 2FA implementation.
2025-09-06 07:57:25 -07:00
Magnus Müller
719761313c Refactor sensitive data handling across examples
- Updated sensitive_data definitions to remove type annotations for clarity.
- Simplified the structure of sensitive_data in multiple files, ensuring consistency in credential representation.
- Enhanced comments to guide users on the proper use of sensitive data in the context of 2FA and domain-specific credentials.

These changes improve the readability and maintainability of the code while ensuring secure handling of sensitive information.
2025-09-06 07:51:52 -07:00
Magnus Müller
55b0af568d Update sensitive_data.py to refine credential entries
- Changed the wildcard entry for Google credentials to a specific domain.
- Added a new entry for a universal email credential that works across all domains.

These updates improve the clarity and specificity of sensitive data handling.
2025-09-06 07:34:40 -07:00
zhcn
5c883062ae Update add_image_context.py code style 2025-09-04 14:54:54 +08:00
zhcn
81cd351670 add image context example 2025-09-04 14:29:04 +08:00
Magnus Müller
dc1eb696b3 remove lmnr from examples 2025-09-03 18:11:45 -07:00
Saurav Panda
89f2346132 Merge branch 'main' into added-playwright-browser-use-example 2025-09-03 15:53:47 -07:00
Magnus Müller
d13cedbf5c fix gemini example 2025-09-03 11:05:42 -07:00
Magnus Müller
e26eceb7fc fix-wildcard-imports 2025-09-03 10:38:42 -07:00
Magnus Müller
8cbf2ff7e1 Update prompt 2025-09-03 09:51:23 -07:00
Magnus Müller
69fdace314 Refactor email handling in 2FA example
- Updated the 2FA example to use the new EmailTools class for managing email interactions.
- Replaced EmailController with EmailTools for better integration with AsyncAgentMail.
- Added functionality to create and manage email inboxes directly within the example.
- Adjusted the agent initialization to accommodate the new tools and models structure.
2025-09-03 09:41:22 -07:00
Magnus Müller
48b98de1df Rename import from llm to models 2025-09-03 09:13:30 -07:00
Magnus Müller
a27dbdbda6 Add lazy import example for browser-use agent with OpenAI LLM integration 2025-09-03 09:10:28 -07:00
Magnus Müller
5cf080c178 Increase timeout 2025-09-02 19:23:18 -07:00
Magnus Müller
304da196af Merge branch 'integration/agent-mail' of https://github.com/browser-use/browser-use into integration/agent-mail 2025-09-02 19:20:21 -07:00
Magnus Müller
d5b8bc83df Update description 2025-09-02 19:20:17 -07:00
Magnus Müller
5c4bdc5534 Update script filter 2025-09-02 19:19:19 -07:00
Magnus Müller
d5b7c1479e Update examples/integrations/agentmail/email_tools.py
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
2025-09-02 19:17:54 -07:00
Magnus Müller
8e29922da5 Change llm 2025-09-02 19:17:43 -07:00
Magnus Müller
c8f564aae0 Refactor email handling for 2FA integration: Moved EmailController to email_tools.py, updated task instructions, and integrated Azure OpenAI for enhanced functionality. 2025-09-02 17:01:37 -07:00
Magnus Müller
3551541462 Merge branch 'main' into integration/agent-mail 2025-09-02 14:57:20 -07:00
Magnus Müller
602d44c8fb Fix simple example 2025-09-02 11:39:34 -07:00
Magnus Müller
19913c20f1 More specific error 2025-09-02 11:36:17 -07:00
EnzoFanAccount
ebe2b3b0a3 example type fix 2025-09-01 10:49:50 -03:00
Saurav Panda
a35707153f fixed playwright import issue 2025-08-31 14:59:50 -07:00
Saurav Panda
52c768207c added browser-use + playwright example 2025-08-31 10:32:59 -07:00
mertunsall
5bce1b6898 enable auto download pdfs 2025-08-31 12:40:24 +02:00
Saurav Panda
59acca9b3b added playwright integration example 2025-08-30 14:26:04 -07:00
Enzo Biondo
d6d5fd0fb6 Merge branch 'main' into feat/video-recording 2025-08-27 14:47:05 -03:00
Magnus Müller
23e4521109 Better instructions 2025-08-27 10:09:57 -07:00
Magnus Müller
97eb3690bc Fix simple example 2025-08-27 01:09:10 -07:00
Magnus Müller
14229cd6e3 Enhance example scripts and improve test handling
- Updated `simple.py` to initialize `Browser` and `Tools` instances, improving agent configuration.
- Fixed action decorator in `notification.py` by removing trailing space for consistency.
- Adjusted test behavior in `test_browser_session_tab_management.py` to skip tests on initial tab count issues, improving test reliability.
- Stopped server in `test_browser_watchdog_downloads_upload_full_circle.py` to ensure proper cleanup before skipping tests.

These changes aim to enhance clarity and maintainability across examples and tests.
2025-08-27 01:04:14 -07:00
Magnus Müller
ce33625262 Rename browser_context to _cdp_client_root and remove test_concurrent 2025-08-26 18:46:37 -07:00
EnzoFanAccount
06d0b1e9ba Merge remote-tracking branch 'upstream/main' into feat/video-recording 2025-08-26 18:37:14 -03:00
Magnus Müller
9463e4eb1e Fix simple example 2025-08-26 14:23:40 -07:00
Magnus Müller
29685aa7ce Merge remote-tracking branch 'origin/main' into rename-controller-to-tools 2025-08-26 13:58:21 -07:00