Skip to content

Commit 0a83b47

Browse files
committed
[rb] Return and deprecate DriverFinder.path
This was accidentally removed in #13386. Fixes #13876. Related to rails/rails#51658.
1 parent 8723d04 commit 0a83b47

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

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

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@
2020
module Selenium
2121
module WebDriver
2222
class DriverFinder
23+
def self.path(options, service)
24+
WebDriver.logger.deprecate('DriverFinder.path', 'DriverFinder.new.driver_path')
25+
new(options, service).driver_path
26+
end
27+
2328
def initialize(options, service)
2429
@options = options
2530
@service = service
@@ -41,9 +46,9 @@ def browser_path?
4146

4247
def paths
4348
@paths ||= begin
44-
path = @service.class.driver_path
49+
path = @service.driver_path
4550
path = path.call if path.is_a?(Proc)
46-
exe = @service.class::EXECUTABLE
51+
exe = @service::EXECUTABLE
4752
if path
4853
WebDriver.logger.debug("Skipping Selenium Manager; path to #{exe} specified in service class: #{path}")
4954
Platform.assert_executable(path)

0 commit comments

Comments
 (0)