Method: Selenium::WebDriver::Platform.find_binary
- Defined in:
- lib/selenium/webdriver/common/platform.rb
.find_binary(*binary_names) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
128 129 130 131 132 133 134 135 136 137 138 139 140 |
# File 'lib/selenium/webdriver/common/platform.rb', line 128 def find_binary(*binary_names) paths = ENV['PATH'].split(File::PATH_SEPARATOR) binary_names.map! { |n| "#{n}.exe" } if windows? binary_names.each do |binary_name| paths.each do |path| exe = File.join(path, binary_name) return exe if File.executable?(exe) end end nil end |