class Selenium::WebDriver::Firefox::Driver

Driver implementation for Firefox using GeckoDriver. @api private

Constants

EXTENSIONS

Public Instance Methods

browser() click to toggle source
# File lib/selenium/webdriver/firefox/driver.rb, line 39
def browser
  :firefox
end

Private Instance Methods

devtools_url() click to toggle source
# File lib/selenium/webdriver/firefox/driver.rb, line 45
def devtools_url
  if capabilities['moz:debuggerAddress'].nil?
    raise(Error::WebDriverError, "DevTools is not supported by this version of Firefox; use v85 or higher")
  end

  uri = URI("http://#{capabilities['moz:debuggerAddress']}")
  response = Net::HTTP.get(uri.hostname, '/json/version', uri.port)

  JSON.parse(response)['webSocketDebuggerUrl']
end
devtools_version() click to toggle source
# File lib/selenium/webdriver/firefox/driver.rb, line 56
def devtools_version
  Firefox::DEVTOOLS_VERSION
end