File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -92,8 +92,20 @@ def login(cls):
9292 # Set up Chrome options to connect to the existing Chrome instance
9393 chrome_options = Options ()
9494 chrome_options .add_experimental_option ("debuggerAddress" , "localhost:9222" )
95+
96+ # Explicitly specify ChromeDriver path and Chrome browser path for macOS
97+ from selenium .webdriver .chrome .service import Service
98+ chromedriver_path = "/usr/local/bin/chromedriver"
99+ chrome_path = "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"
100+
101+ # Set Chrome as the browser binary
102+ chrome_options .binary_location = chrome_path
103+
104+ # Create service with explicit ChromeDriver path
105+ service = Service (executable_path = chromedriver_path )
106+
95107 # Connect to the existing Chrome instance
96- cls .seleniumdriver = webdriver .Chrome (options = chrome_options )
108+ cls .seleniumdriver = webdriver .Chrome (service = service , options = chrome_options )
97109
98110 print ("Open a window on Chrome" )
99111
You can’t perform that action at this time.
0 commit comments