Commit Graph

207 Commits

Author SHA1 Message Date
Nick Sweeting
2f002b4c22 rename session.py profile.py, fix stealth example, fix tests 2025-05-20 05:34:47 -07:00
Nick Sweeting
15a760ef17 backwards compatibility with old models and improved tests with icognito mode 2025-05-20 03:07:01 -07:00
Nick Sweeting
ca20ef496a add old files for compat 2025-05-19 17:50:25 -07:00
Nick Sweeting
ba8f8237f6 remove dead code 2025-05-17 04:58:27 -07:00
Nick Sweeting
90dad4a39a refactor to use new BrowserSession model 2025-05-17 04:54:13 -07:00
Nick Sweeting
297d3ba380 show glob warning when matching via globs 2025-05-13 19:07:41 -07:00
Nick Sweeting
2c933c34ec update docs to include bad examples 2025-05-13 18:40:19 -07:00
Nick Sweeting
7e26eb14b1 add glob support to allowed_domains 2025-05-13 18:25:28 -07:00
Nick Sweeting
f6bec3cd91 fix nulref 2025-05-12 12:47:26 -07:00
Nick Sweeting
97ec8f7d6a only inject init_scripts on pages that arent embedded PDF viewer 2025-05-12 12:34:22 -07:00
Nick Sweeting
21cb86e66a Merge branch 'main' into back-to-playwright 2025-05-12 05:31:23 -07:00
satya-nutella
0b0319bb83 fix(context, service): streamline element visibility checks
- Replaced direct calls to `is_hidden` with a new `_is_visible` method for consistency in visibility checks across the context and service layers.
- Updated element selection logic to ensure only visible elements are scrolled into view, improving reliability and performance.
2025-05-11 08:56:17 -07:00
satya-nutella
34ff079c90 fix: linter 2025-05-11 08:49:54 -07:00
satya-nutella
af2bbd5187 feat(context): add _is_visible method for better element visibility checks
- Introduced a new private method `_is_visible` to determine if an element is visible based on its hidden state and bounding box dimensions.
- Updated element selection logic to utilize the new visibility check, ensuring only visible elements are processed.
- Added .idea to .gitignore to exclude IDE-specific files from version control.
2025-05-10 18:41:02 -07:00
Nick Sweeting
96682d8910 switch back from patchright to playwright until issues are resolved 2025-05-09 18:14:07 -07:00
Valentin De Matos
bf1def969d fix(context): no longer modify page on screenshot
Signed-off-by: Valentin De Matos <vltn.dematos@gmail.com>
2025-05-09 14:01:25 -07:00
Nick Sweeting
c3c492f2d7 click elements before typing into them, fallback to simulating keystrokes on page 2025-05-06 00:09:12 +08:00
Nick Sweeting
4af9c9f1cd remove unused var 2025-05-04 18:49:55 +08:00
Nick Sweeting
7f065aafd9 massively improve foreground and agent current tab detection and viewport resizing 2025-05-04 17:56:51 +08:00
Nick Sweeting
8c97f892aa require clipboard-read and write permissions by default and warn when missing 2025-05-04 17:53:36 +08:00
Nick Sweeting
ebdeb613f7 fix security issue with url parsing 2025-05-03 23:50:37 +08:00
Nick Sweeting
8774dd48be BREAKING CHANGE: remove window_size=BrowserWindowContextSize(width, height) in favor of flat window_width and window_height (#1557) 2025-05-03 00:52:08 -07:00
Nick Sweeting
4b1e15d8bd remove BrowserWindowContextSize in favor of window_width and window_height attrs 2025-05-03 15:32:42 +08:00
satya-nutella
7811a1cceb Refactor event listener tracking in BrowserSession and BrowserContext
- Removed old init script for event listener tracking in BrowserSession.
- Introduced a new event listener tracking mechanism in BrowserContext using WeakMap for better memory management.
- Updated buildDomTree to utilize the new getEventListenersForNode function for interaction event listeners.
2025-05-02 12:56:41 -07:00
Nick Sweeting
7e9296e340 add clipboard permissions at startup 2025-05-03 03:17:24 +08:00
Nick Sweeting
2be4ba4f70 more pyupgrade changes 2025-05-02 20:50:21 +08:00
Sandeep Salwan
361fb82142 Fix: Respect user-provided no_viewport setting in browser sizing 2025-04-30 21:14:08 -07:00
Sandeep Salwan
b4133b8912 Fix browser_window_size not changing window size in non-headless mode 2025-04-29 18:02:29 -07:00
Sandeep Salwan
e0565496e8 ruff 2025-04-24 18:30:39 -04:00
Sandeep Salwan
a10d7e4288 Fix browser_window_size not changing window size in non-headless mode 2025-04-24 18:13:33 -04:00
Nick Sweeting
02fb682d04 Merge pull request #1310 from cclauss/ruff_check_--select=ASYNC 2025-04-21 15:10:57 -07:00
kalil0321
5163c81ea2 Merge branch 'main' into main 2025-04-21 23:03:49 +02:00
Christian Clauss
fb3282527d Detect blocking synchronous commands in asyncio code 2025-04-21 22:30:43 +02:00
Nick Sweeting
1ac623f798 Merge pull request #857 from neo773/bot-detection-batch 2025-04-21 09:56:27 -07:00
Edward Sun
cd938016bb Fix: newlines in attribute values 2025-04-17 18:40:26 -07:00
kalil0321
c6ffe81d90 format 2025-04-18 02:56:26 +02:00
kalil0321
a9bdad4ba2 add force_new_context docstring
in BrowserContextConfig
2025-04-18 02:48:20 +02:00
kalil0321
f4985879c3 fix #1405: HAR file is not saved 2025-04-18 02:17:18 +02:00
Nick Sweeting
72c6abdabf Update browser_use/browser/context.py 2025-04-16 19:04:48 -04:00
Nick Sweeting
49ef4fca50 Merge branch 'main' into fix-web-voyager-example 2025-04-16 16:04:08 -07:00
Nick Sweeting
8ba3e570e6 Merge branch 'main' into bot-detection-batch 2025-04-16 15:19:02 -07:00
Nick Sweeting
f6dbca82ee Update browser_use/browser/context.py
Co-authored-by: JT <162653111+mosaictheory-jt@users.noreply.github.com>
2025-04-16 18:13:13 -04:00
Gregor Žunič
facab7c9d1 Merge branch 'main' into gregor/lib-53-fix-extraction-layer-problems 2025-04-14 11:15:01 +02:00
neo773
c33c3aeb35 Merge branch 'main' into bot-detection-batch 2025-04-12 07:25:58 +05:30
Ulrich Soeffing
a7685d3e30 Fix web_voyager_agent.py example 2025-04-10 22:14:06 -04:00
LarsenCundric
5d30fefb42 Ensure element handle is visible before trying to scroll into view 2025-04-09 16:58:22 +02:00
Gregor Žunič
be0a3eb564 added *[]* for elements newly app; fixes 2025-04-08 16:39:00 +02:00
Nick Sweeting
c49ce804a0 migrate from TypedDict to Pydantic models for browser config 2025-04-06 12:28:21 -07:00
Nick Sweeting
f82290b6bd fix trying to splat a pydantic model directly 2025-04-06 12:01:28 -07:00
Gregor Žunič
3427cf9f6b Merge branch 'gregor/lib-53-fix-extraction-layer-problems' into main 2025-04-05 19:07:05 +02:00