Class: Webdrivers::Edgedriver

Inherits:
Common
  • Object
show all
Defined in:
lib/webdrivers/edgedriver.rb

Class Method Summary collapse

Methods inherited from Common

binary_path, decompress_file, download, install, install_dir, internet_connection?, platform, platform_install_dir, untargz_file, unzip_file

Class Method Details

.base_urlObject



28
29
30
# File 'lib/webdrivers/edgedriver.rb', line 28

def base_url
  'http://google.com'
end

.current_versionObject



11
12
13
# File 'lib/webdrivers/edgedriver.rb', line 11

def current_version
  # No version information available
end

.download_url(version = nil) ⇒ Object



20
21
22
23
24
25
26
# File 'lib/webdrivers/edgedriver.rb', line 20

def download_url(version = nil)
  if newest_version.to_i >= 14986
    'https://download.microsoft.com/download/1/4/1/14156DA0-D40F-460A-B14D-1B264CA081A5/MicrosoftWebDriver.exe'
  else
    'https://download.microsoft.com/download/3/2/D/32D3E464-F2EF-490F-841B-05D53C848D15/MicrosoftWebDriver.exe'
  end
end

.file_nameObject



7
8
9
# File 'lib/webdrivers/edgedriver.rb', line 7

def file_name
  "MicrosoftWebDriver.exe"
end

.newest_versionObject



15
16
17
18
# File 'lib/webdrivers/edgedriver.rb', line 15

def newest_version
  version = %x(ver)
  version[/\d+\.\d+\.\d+/][/[^\.]\d+$/]
end