Skip to content

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

throw explicit error for missing page

Nick Sweeting9bf0b10b3189
diff --git a/browser_use/controller/registry/service.py b/browser_use/controller/registry/service.py
index 727484d62..594f6f93c 100644
--- a/browser_use/controller/registry/service.py
+++ b/browser_use/controller/registry/service.py
@@ -197,6 +197,8 @@ class Registry(Generic[Context]):
raise ValueError(f'Action {func.__name__} requires browser_session but none provided.')
elif param.name == 'page_extraction_llm':
raise ValueError(f'Action {func.__name__} requires page_extraction_llm but none provided.')
+ elif param.name == 'page':
+ raise ValueError(f'Action {func.__name__} requires page but none provided.')
else:
raise ValueError(f"{func.__name__}() missing required special parameter '{param.name}'")
call_args.append(value)
@@ -208,6 +210,8 @@ class Registry(Generic[Context]):
raise ValueError(f'Action {func.__name__} requires browser_session but none provided.')
elif param.name == 'page_extraction_llm':
raise ValueError(f'Action {func.__name__} requires page_extraction_llm but none provided.')
+ elif param.name == 'page':
+ raise ValueError(f'Action {func.__name__} requires page but none provided.')
else:
raise ValueError(f"{func.__name__}() missing required special parameter '{param.name}'")
else: