browser-use icon indicating copy to clipboard operation
browser-use copied to clipboard

Website with dynamic content start a endless loop

Open mattmarcin opened this issue 1 year ago • 2 comments

Bug Description

I tried to scrape: https://bizfileonline.sos.ca.gov/search/business for a business name to get the filing information.

This website expands the data when you click on the business which doesn't let the bot know anything has changed so it keeps trying to click even though visually to the user, the data is there.

Reproduction Steps

Task: Task attached below.

Tried using with both locally installed chrome and playwright default.

Using Gemini 2.0 Flash

Code Sample

You are tasked with building a Markdown report for the company: Alphabet Inc. located at 1600 AMPHITHEATRE PARKWAY
MOUNTAIN VIEW, CA 94043.
    The report should include the following sections:
    - Company Overview which should include the following information:
        - Company Name: 
        - Company Address: 
        - Company Phone: 
        - Company Website: 
        - Company Description:
        - Secretary of State Filings:
            - Business Entity Type:
            - Filing Date:
            - File Number:
            - Entity Type:
            - Status:
            - Dissolution Date:
            - Agent:
            - Agent Phone:
            - Agent Email:
            - Agent Address:
            - Agent City:
            - Agent State:
            - Agent Zip:
        - Summary of Lawsuits:
            - Lawsuit Name:
            - Lawsuit Description:
            - Lawsuit Filed Date:
            - Lawsuit Status:
            - Lawsuit Type:
        - People Associated with the Company:
            - Name:
            - Title:
            - Phone:
            - Email:
            - Address:
            - City:

Version

0.1.36

LLM Model

Other (specify in description)

Operating System

Windows 11

Relevant Log Output


mattmarcin avatar Feb 10 '25 19:02 mattmarcin

similar happened here, on mac . LLM openai-gpt-4o page: https://gmgn.ai/sol/token/6p6xgHyF7AeE6TZkSmFsko444wqoP15icUSqi2jfGiPN

NFO     [agent] 🛠️  Action 1/1: {"click_element":{"index":413}}
INFO     [controller] 🖱️  Clicked button with index 413: Buy 0.01 SOL ($1.74)
INFO     [agent] 📍 Step 10
INFO     [agent] ⚠ Eval: Failed - Clicking on various 'Buy' buttons did not complete the purchase.
INFO     [agent] 🧠 Memory: Have opened the TRUMP token page multiple times and tried buying 0.01 trump without success. Need to potentially revise strategy or confirm the correct button for purchase.
INFO     [agent] 🎯 Next goal: Identify and click the correct 'Buy Now' button to finalize the purchase.
INFO     [agent] 🛠️  Action 1/1: {"click_element":{"index":401}}
INFO     [controller] 🖱️  Clicked button with index 401: Buy Now
INFO     [agent] 📍 Step 11
INFO     [agent] ⚠ Eval: Failed - Did not succeed in completing the purchase of 0.01 trump yet.
INFO     [agent] 🧠 Memory: Attempted multiple times to buy 0.01 trump without success. Various buttons have been clicked but purchase not confirmed.
INFO     [agent] 🎯 Next goal: Identify the correct button and action to successfully complete the purchase of 0.01 trump.
INFO     [agent] 🛠️  Action 1/1: {"click_element":{"index":421}}
INFO     [controller] 🖱️  Clicked button with index 421: Buy 0.01 SOL ($1.74

seems the element keep changeing for the real buy button

no7dw avatar Feb 20 '25 11:02 no7dw

The library gained loop detection since this was filed. The current version includes an ActionLoopDetector with escalating nudges when actions repeat. Using the latest version and a Gemini model, you should get it to work.

laithrw avatar Mar 07 '26 22:03 laithrw