|
20 | 20 | import socket |
21 | 21 | import subprocess |
22 | 22 | import time |
| 23 | +from pathlib import Path |
| 24 | +from python.runfiles import Runfiles |
23 | 25 | from test.selenium.webdriver.common.network import get_lan_ip |
24 | 26 | from test.selenium.webdriver.common.webserver import SimpleWebServer |
25 | 27 | from urllib.request import urlopen |
@@ -192,6 +194,7 @@ def get_options(driver_class, config): |
192 | 194 | options = None |
193 | 195 |
|
194 | 196 | if browser_path or browser_args: |
| 197 | + print("Browser path", browser_path, "Browser args", browser_args) |
195 | 198 | if not options: |
196 | 199 | options = getattr(webdriver, f"{driver_class}Options")() |
197 | 200 | if driver_class == "WebKitGTK": |
@@ -226,8 +229,15 @@ def get_service(driver_class, executable): |
226 | 229 | if not executable: |
227 | 230 | return None |
228 | 231 |
|
| 232 | + r = Runfiles.Create() |
| 233 | + path = r.Rlocation(executable) |
| 234 | + print("cwd", os.getcwd()) |
| 235 | + print("get_service, executable is", executable, path) |
| 236 | + if not Path(path).is_file(): |
| 237 | + raise ValueError(f"Hmph!: {path}") |
| 238 | + |
229 | 239 | module = getattr(webdriver, driver_class.lower()) |
230 | | - service = module.service.Service(executable_path=executable) |
| 240 | + service = module.service.Service(executable_path=path) |
231 | 241 |
|
232 | 242 | return service |
233 | 243 |
|
|
0 commit comments