Skip to content

Commit

Permalink
[rb] Set binary path on driver path lookup
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
p0deje committed May 16, 2024
1 parent e234a9c commit b9aa16a
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion rb/lib/selenium/webdriver/common/driver_finder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,14 @@ def paths
formatted = {driver_path: Platform.cygwin_path(output['driver_path'], only_cygwin: true),
browser_path: Platform.cygwin_path(output['browser_path'], only_cygwin: true)}
Platform.assert_executable(formatted[:driver_path])
Platform.assert_executable(formatted[:browser_path])

browser_path = formatted[:browser_path]
Platform.assert_executable(browser_path)
if @options.respond_to?(:binary) && @options.binary.nil?
@options.binary = browser_path
@options.browser_version = nil
end

formatted
end
rescue StandardError => e
Expand Down

0 comments on commit b9aa16a

Please sign in to comment.