i can Connect to my existing Chrome installation to access saved states and cookies. by…
- User
i can Connect to my existing Chrome installation to access saved states and cookies. by running:
codeconfig = BrowserConfig( chrome_instance_path="C:\Program Files\Google\Chrome\Application\chrome.exe" )but how can i connect to my user data directory of my browser. "C:\Users\YourUsername\AppData\Local\Google\Chrome\User Data"
Assistant
Based on the provided repository code, while browser-use allows connecting to an existing Chrome installation, it doesn't directly expose a way to specify the user data directory in the current implementation.
However, looking at the code in
browser/browser.py, you can modify theBrowserConfigto include Chrome command line arguments using theextra_chromium_argsparameter. Here's how you can connect to your specific user data directory:pythonconfig = BrowserConfig( chrome_instance_path="C:\Program Files\Google\Chrome\Application\chrome.exe", extra_chromium_args=[ f'--user-data-dir=C:\\Users\\YourUsername\\AppData\\Local\\Google\\Chrome\\User Data' ] ) browser = Browser(config=config)
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.