Skip to content

Commit b9aa16a

Browse files
committed
[rb] Set binary path on driver path lookup
It's a hacky way to solve #13918. The follow-up is to ensure Rails don't preload the drivers/browsers (assuming Selenium-Manager doesn't have race conditions) and make DriverFinder a private API.
1 parent e234a9c commit b9aa16a

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

rb/lib/selenium/webdriver/common/driver_finder.rb

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,14 @@ def paths
5959
formatted = {driver_path: Platform.cygwin_path(output['driver_path'], only_cygwin: true),
6060
browser_path: Platform.cygwin_path(output['browser_path'], only_cygwin: true)}
6161
Platform.assert_executable(formatted[:driver_path])
62-
Platform.assert_executable(formatted[:browser_path])
62+
63+
browser_path = formatted[:browser_path]
64+
Platform.assert_executable(browser_path)
65+
if @options.respond_to?(:binary) && @options.binary.nil?
66+
@options.binary = browser_path
67+
@options.browser_version = nil
68+
end
69+
6370
formatted
6471
end
6572
rescue StandardError => e

0 commit comments

Comments
 (0)