File tree Expand file tree Collapse file tree
rb/lib/selenium/webdriver/common Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -33,18 +33,16 @@ class << self
3333 # @param [String] driver_name which driver to use.
3434 # @return [String] the path to the correct driver.
3535 def driver_path ( driver_name )
36- @driver_path ||= begin
37- unless %w[ chromedriver geckodriver msedgedriver IEDriverServer ] . include? ( driver_name )
38- msg = "Unable to locate driver with name: #{ driver_name } "
39- raise Error ::WebDriverError , msg
40- end
36+ unless %w[ chromedriver geckodriver msedgedriver IEDriverServer ] . include? ( driver_name )
37+ msg = "Unable to locate driver with name: #{ driver_name } "
38+ raise Error ::WebDriverError , msg
39+ end
4140
42- location = run ( "#{ binary } --driver #{ driver_name } " )
43- WebDriver . logger . debug ( "Driver found at #{ location } " )
44- Platform . assert_executable location
41+ location = run ( "#{ binary } --driver #{ driver_name } " )
42+ WebDriver . logger . debug ( "Driver found at #{ location } " )
43+ Platform . assert_executable location
4544
46- location
47- end
45+ location
4846 end
4947
5048 private
You can’t perform that action at this time.
0 commit comments