From f05ba72d36f73d7f54bc8a9b03304ed1edb1348d Mon Sep 17 00:00:00 2001 From: Abhay S N Date: Fri, 10 Jan 2025 12:45:50 +0530 Subject: [PATCH] Update chrome_browser_options to support Chrome user profiles --- src/utils/chrome_utils.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/utils/chrome_utils.py b/src/utils/chrome_utils.py index 639a29584..ebb4560bd 100644 --- a/src/utils/chrome_utils.py +++ b/src/utils/chrome_utils.py @@ -31,7 +31,11 @@ def chrome_browser_options(): options.add_argument("--incognito") options.add_argument("--allow-file-access-from-files") # Consente l'accesso ai file locali options.add_argument("--disable-web-security") # Disabilita la sicurezza web - logger.debug("Using Chrome in incognito mode") + # Add user profile directory options + options.add_argument("--user-data-dir=/path to your chrome profile") + options.add_argument("--profile-directory=your profile name") + + logger.debug("Using specified Chrome user") return options