Method: Selenium::WebDriver::Firefox::Binary.path

Defined in:
lib/selenium/webdriver/firefox/binary.rb

.pathObject



99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
# File 'lib/selenium/webdriver/firefox/binary.rb', line 99

def path
  @path ||= case Platform.os
            when :macosx
              "/Applications/Firefox.app/Contents/MacOS/firefox-bin"
            when :windows
              windows_path
            when :linux, :unix
              Platform.find_binary("firefox3", "firefox2", "firefox") || "/usr/bin/firefox"
            else
              raise Error::WebDriverError, "unknown platform: #{Platform.os}"
            end

  unless File.file?(@path)
    raise Error::WebDriverError, "Could not find Firefox binary (os=#{Platform.os}). Make sure Firefox is installed or set the path manually with #{self}.path="
  end

  @path
end