Skip to content

Open-source Python library for AI browser agents, plus Browser Use Cloud: stealth browsers and a hosted agent API.

Refactor max_iframe_depth field formatting in BrowserProfile class for improved readability.

Magnus Müller744dd53c618c
diff --git a/browser_use/browser/profile.py b/browser_use/browser/profile.py
index 3be208003..2563a4c01 100644
--- a/browser_use/browser/profile.py
+++ b/browser_use/browser/profile.py
@@ -594,7 +594,8 @@ class BrowserProfile(BrowserConnectArgs, BrowserLaunchPersistentContextArgs, Bro
default=100,
description='Maximum number of iframe documents to process to prevent crashes.',
)
- max_iframe_depth: int = Field(ge=0,
+ max_iframe_depth: int = Field(
+ ge=0,
default=5,
description='Maximum depth for cross-origin iframe recursion (default: 5 levels deep).',
)