Skip to content

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

fix: enable Page domain before registering dialog handler

ShawnPanaf26bd52af02f
diff --git a/browser_use/skill_cli/browser.py b/browser_use/skill_cli/browser.py
index 5f61b7657..26c7caee9 100644
--- a/browser_use/skill_cli/browser.py
+++ b/browser_use/skill_cli/browser.py
@@ -90,6 +90,7 @@ class CLIBrowserSession(BrowserSession):
except Exception:
pass
+ await self._cdp_client_root.send.Page.enable()
self._cdp_client_root.register.Page.javascriptDialogOpening(handle_dialog) # type: ignore[arg-type]
async def _launch_local_browser(self) -> None: