Skip to content

Commit 0e1ff86

Browse files
committed
fix: windows tests chrome driver path missing
1 parent 8909d99 commit 0e1ff86

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

sample/Tests/test/test_windows_helpers.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)