Skip to content

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

fix message

mertunsalle46e60f8024d
diff --git a/browser_use/browser/session.py b/browser_use/browser/session.py
index 95100967e..c7c39757f 100644
--- a/browser_use/browser/session.py
+++ b/browser_use/browser/session.py
@@ -3562,11 +3562,13 @@ class BrowserSession(BaseModel):
if is_new_tab_page(page.url):
self.logger.warning(
- f'▫️ Sending LLM 1px placeholder instead of real screenshot of: {_log_pretty_url(page.url)} (page empty)'
+ f'▫️ Sending LLM no screenshot instead of real screenshot of: {_log_pretty_url(page.url)} (page empty)'
)
# Not an exception because there's no point in retrying if we hit this, its always pointless to screenshot about:blank
# Originally returned a 1x1 white PNG to avoid wasting tokens, but groq LLaMa models do not accept this
# So we return None instead, which the LLM can handle more reliably
+ # TODO: this should be decided on an LLM level - now take_screenshot doesnt give you the screenshot if the page is empty
+ # this might be weird behavior for the library overall
return None
# Always bring page to front before rendering, otherwise it crashes in some cases, not sure why