From 57d50536cbddc481b87f66a6fc0cbc98b4f43c09 Mon Sep 17 00:00:00 2001 From: Mahmudul Alam Date: Thu, 23 Oct 2025 06:35:54 +0600 Subject: [PATCH] fixed it --- .../Web/Selenium/BuiltInFunctions.py | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/Framework/Built_In_Automation/Web/Selenium/BuiltInFunctions.py b/Framework/Built_In_Automation/Web/Selenium/BuiltInFunctions.py index 57cad6984..caf0eaebb 100644 --- a/Framework/Built_In_Automation/Web/Selenium/BuiltInFunctions.py +++ b/Framework/Built_In_Automation/Web/Selenium/BuiltInFunctions.py @@ -686,10 +686,20 @@ def Open_Browser(browser, browser_options: BrowserOptions): service = Service() CommonUtil.ExecLog(sModuleInfo, "Using standard Chrome binaries", 1) - selenium_driver = webdriver.Chrome( - service=service, - options=options, - ) + try: + selenium_driver = webdriver.Chrome( + service=service, + options=options, + ) + except SessionNotCreatedException as e: + if "user data directory" in str(e).lower() and "already in use" in str(e).lower(): + options.add_argument(f"--no-sandbox") + selenium_driver = webdriver.Chrome( + service=service, + options=options, + ) + else: + raise # service = Service() # selenium_driver = webdriver.Chrome(