File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -150,8 +150,17 @@ def logout_with_controlled_browser():
150150 chrome_options .add_experimental_option ("debuggerAddress" , "localhost:9222" )
151151
152152 try :
153- # Connect to the existing browser instance
154- driver = webdriver .Chrome (options = chrome_options )
153+ # Connect to the existing browser instance with explicit ChromeDriver path
154+ from selenium .webdriver .chrome .service import Service
155+ chromedriver_path = r"C:\Users\WindowsBuildsdkServi\Development\chromedriver-win64\chromedriver-win64\chromedriver.exe"
156+
157+ import os
158+ if os .path .exists (chromedriver_path ):
159+ service = Service (executable_path = chromedriver_path )
160+ else :
161+ service = Service () # Let Selenium Manager handle it
162+
163+ driver = webdriver .Chrome (service = service , options = chrome_options )
155164 print ("Connected to existing browser for logout" )
156165
157166 # Monitor Unity logs for logout URL
You can’t perform that action at this time.
0 commit comments