Open-source Python library for AI browser agents, plus Browser Use Cloud: stealth browsers and a hosted agent API.
Python ai-agentsai-toolsbrowser-agentbrowser-automationbrowser-usecdpcloud-browsercomputer-useheadless-browserllmmcpplaywrightpythonremote-browserstealth-browserweb-automationweb-scraping
fixed aria hash pop up handling
Saurav Panda3d4dc6fe1505
diff --git a/browser_use/agent/system_prompts/system_prompt.md b/browser_use/agent/system_prompts/system_prompt.mdindex cca04084f..c8c9c9bb0 100644--- a/browser_use/agent/system_prompts/system_prompt.md+++ b/browser_use/agent/system_prompts/system_prompt.md@@ -75,7 +75,7 @@ Strictly follow these rules while using the browser and navigating the web:- If the <user_request> includes specific page information such as product type, rating, price, location, etc., try to apply filters to be more efficient.- The <user_request> is the ultimate goal. If the user specifies explicit steps, they have always the highest priority.- If you input into a field, you might need to press enter, click the search button, or select from dropdown for completion.-- For autocomplete/combobox fields (e.g. search boxes with suggestions, fields with role="combobox"): type your search text, then WAIT for the suggestions dropdown to appear in the next step. Review the new elements (marked with *[) and click the correct suggestion. Do NOT press Enter or submit before selecting from the suggestions -- autocomplete fields require clicking a suggestion to set the correct value.+- For autocomplete/combobox fields (e.g. search boxes with suggestions, fields with role="combobox"): type your search text, then WAIT for the suggestions dropdown to appear in the next step. If suggestions appear (new elements marked with *[), click the correct one instead of pressing Enter. If no suggestions appear after one step, you may press Enter or submit normally.- Don't login into a page if you don't have to. Don't login if you don't have the credentials.- There are 2 types of tasks always first think which type of request you are dealing with:1. Very specific step by step instructions:diff --git a/browser_use/agent/system_prompts/system_prompt_anthropic.md b/browser_use/agent/system_prompts/system_prompt_anthropic.mdindex 75c998677..23853e899 100644--- a/browser_use/agent/system_prompts/system_prompt_anthropic.md+++ b/browser_use/agent/system_prompts/system_prompt_anthropic.md@@ -75,7 +75,7 @@ Strictly follow these rules while using the browser and navigating the web:- If the <user_request> includes specific page information such as product type, rating, price, location, etc., ALWAYS look for filter/sort options FIRST before browsing results. Apply all relevant filters before scrolling through results.- The <user_request> is the ultimate goal. If the user specifies explicit steps, they have always the highest priority.- If you input into a field, you might need to press enter, click the search button, or select from dropdown for completion.-- For autocomplete/combobox fields (e.g. search boxes with suggestions, fields with role="combobox"): type your search text, then WAIT for the suggestions dropdown to appear in the next step. Review the new elements (marked with *[) and click the correct suggestion. Do NOT press Enter or submit before selecting from the suggestions -- autocomplete fields require clicking a suggestion to set the correct value.+- For autocomplete/combobox fields (e.g. search boxes with suggestions, fields with role="combobox"): type your search text, then WAIT for the suggestions dropdown to appear in the next step. If suggestions appear (new elements marked with *[), click the correct one instead of pressing Enter. If no suggestions appear after one step, you may press Enter or submit normally.- Don't login into a page if you don't have to. Don't login if you don't have the credentials.- There are 2 types of tasks always first think which type of request you are dealing with:1. Very specific step by step instructions:diff --git a/browser_use/agent/system_prompts/system_prompt_anthropic_flash.md b/browser_use/agent/system_prompts/system_prompt_anthropic_flash.mdindex 60baf4c9f..f4241715c 100644--- a/browser_use/agent/system_prompts/system_prompt_anthropic_flash.md+++ b/browser_use/agent/system_prompts/system_prompt_anthropic_flash.md@@ -41,7 +41,7 @@ Strictly follow these rules while using the browser and navigating the web:- If the <user_request> includes specific page information such as product type, rating, price, location, etc., ALWAYS look for filter/sort options FIRST before browsing results. Apply all relevant filters before scrolling through results. This is critical for efficiency.- The <user_request> is the ultimate goal. If the user specifies explicit steps, they have always the highest priority.- If you input into a field, you might need to press enter, click the search button, or select from dropdown for completion.-- For autocomplete/combobox fields (e.g. search boxes with suggestions, fields with role="combobox"): type your search text, then WAIT for the suggestions dropdown to appear in the next step. Review the new elements (marked with *[) and click the correct suggestion. Do NOT press Enter or submit before selecting from the suggestions -- autocomplete fields require clicking a suggestion to set the correct value.+- For autocomplete/combobox fields (e.g. search boxes with suggestions, fields with role="combobox"): type your search text, then WAIT for the suggestions dropdown to appear in the next step. If suggestions appear (new elements marked with *[), click the correct one instead of pressing Enter. If no suggestions appear after one step, you may press Enter or submit normally.- Don't login into a page if you don't have to. Don't login if you don't have the credentials.- There are 2 types of tasks:1. Very specific step by step instructions: Follow them as very precise and don't skip steps. Try to complete everything as requested.diff --git a/browser_use/agent/system_prompts/system_prompt_anthropic_no_thinking.md b/browser_use/agent/system_prompts/system_prompt_anthropic_no_thinking.mdindex 52799c202..e05164a92 100644--- a/browser_use/agent/system_prompts/system_prompt_anthropic_no_thinking.md+++ b/browser_use/agent/system_prompts/system_prompt_anthropic_no_thinking.md@@ -75,7 +75,7 @@ Strictly follow these rules while using the browser and navigating the web:- If the <user_request> includes specific page information such as product type, rating, price, location, etc., ALWAYS look for filter/sort options FIRST before browsing results. Apply all relevant filters before scrolling through results.- The <user_request> is the ultimate goal. If the user specifies explicit steps, they have always the highest priority.- If you input into a field, you might need to press enter, click the search button, or select from dropdown for completion.-- For autocomplete/combobox fields (e.g. search boxes with suggestions, fields with role="combobox"): type your search text, then WAIT for the suggestions dropdown to appear in the next step. Review the new elements (marked with *[) and click the correct suggestion. Do NOT press Enter or submit before selecting from the suggestions -- autocomplete fields require clicking a suggestion to set the correct value.+- For autocomplete/combobox fields (e.g. search boxes with suggestions, fields with role="combobox"): type your search text, then WAIT for the suggestions dropdown to appear in the next step. If suggestions appear (new elements marked with *[), click the correct one instead of pressing Enter. If no suggestions appear after one step, you may press Enter or submit normally.- Don't login into a page if you don't have to. Don't login if you don't have the credentials.- There are 2 types of tasks always first think which type of request you are dealing with:1. Very specific step by step instructions:diff --git a/browser_use/agent/system_prompts/system_prompt_no_thinking.md b/browser_use/agent/system_prompts/system_prompt_no_thinking.mdindex 02fe42673..279c910fa 100644--- a/browser_use/agent/system_prompts/system_prompt_no_thinking.md+++ b/browser_use/agent/system_prompts/system_prompt_no_thinking.md@@ -75,7 +75,7 @@ Strictly follow these rules while using the browser and navigating the web:- If the <user_request> includes specific page information such as product type, rating, price, location, etc., try to apply filters to be more efficient.- The <user_request> is the ultimate goal. If the user specifies explicit steps, they have always the highest priority.- If you input into a field, you might need to press enter, click the search button, or select from dropdown for completion.-- For autocomplete/combobox fields (e.g. search boxes with suggestions, fields with role="combobox"): type your search text, then WAIT for the suggestions dropdown to appear in the next step. Review the new elements (marked with *[) and click the correct suggestion. Do NOT press Enter or submit before selecting from the suggestions -- autocomplete fields require clicking a suggestion to set the correct value.+- For autocomplete/combobox fields (e.g. search boxes with suggestions, fields with role="combobox"): type your search text, then WAIT for the suggestions dropdown to appear in the next step. If suggestions appear (new elements marked with *[), click the correct one instead of pressing Enter. If no suggestions appear after one step, you may press Enter or submit normally.- Don't login into a page if you don't have to. Don't login if you don't have the credentials.- There are 2 types of tasks always first think which type of request you are dealing with:1. Very specific step by step instructions:diff --git a/browser_use/tools/service.py b/browser_use/tools/service.pyindex 3a8ccbadc..83da1f663 100644--- a/browser_use/tools/service.py+++ b/browser_use/tools/service.py@@ -112,7 +112,8 @@ def _is_autocomplete_field(node: EnhancedDOMTreeNode) -> bool:return Trueif attrs.get('list'):return True- if attrs.get('aria-haspopup') and (attrs.get('aria-controls') or attrs.get('aria-owns')):+ haspopup = attrs.get('aria-haspopup', '')+ if haspopup and haspopup != 'false' and (attrs.get('aria-controls') or attrs.get('aria-owns')):return Truereturn False