class EdgedriverDownloader
FireFoxDriver specific functions for driver downloading.
Constants
- EDGEDRIVER_URL
Public Class Methods
new(verbose = true)
click to toggle source
Calls superclass method
DriverDownloader::new
# File lib/chauffeur/downloaders/edgedriver_downloader.rb, line 5 def initialize(verbose = true) @all_driver_versions = all_driver_versions super(verbose) end
Public Instance Methods
all_driver_versions()
click to toggle source
Returns all available versions of microsoft webdriver
# File lib/chauffeur/downloaders/edgedriver_downloader.rb, line 31 def all_driver_versions resp = HTTParty.get(driver_url, verify: false).parsed_response doc = Nokogiri::XML.parse(resp) output = {} doc.css('li.driver-download a.subtitle').each do |a| output[a.text.gsub('Release ', '')] = a[:href] end output end
all_platforms()
click to toggle source
# File lib/chauffeur/downloaders/edgedriver_downloader.rb, line 18 def all_platforms %w[win] end
browser_name()
click to toggle source
# File lib/chauffeur/downloaders/edgedriver_downloader.rb, line 10 def browser_name 'microsoft_webdriver' end
driver_download_url(version, platform)
click to toggle source
Returns the url for the desired version of microsoft webdriver version: string - must match exactly the version in the download URL platform: string - must be win
# File lib/chauffeur/downloaders/edgedriver_downloader.rb, line 44 def driver_download_url(version, platform) raise unknown_platform_error(platform) unless valid_platform?(platform) @all_driver_versions[version] || raise(unknown_version_error(version)) end
driver_url()
click to toggle source
# File lib/chauffeur/downloaders/edgedriver_downloader.rb, line 14 def driver_url EDGEDRIVER_URL end
latest_driver_version(platform)
click to toggle source
Returns the most recent version of edgedriver for the desired platform. platform must be one of: win
# File lib/chauffeur/downloaders/edgedriver_downloader.rb, line 25 def latest_driver_version(platform) raise unknown_platform_error(platform) unless valid_platform?(platform) @all_driver_versions.keys.sort.reverse.find { |k| k =~ /^\d+$/ } end