Class: Webdrivers::MSWebdriver
- Inherits:
-
Common
- Object
- Common
- Webdrivers::MSWebdriver
show all
- Defined in:
- lib/webdrivers/mswebdriver.rb
Class Method Summary
collapse
Methods inherited from Common
binary, desired_version, download, install_dir, latest_version, remove, update
Class Method Details
.version= ⇒ Object
26
27
28
|
# File 'lib/webdrivers/mswebdriver.rb', line 26
def version=(*)
raise 'Version can not be set for MSWebdriver because it is dependent on the version of Edge'
end
|
.windows_version ⇒ Object
Also known as:
version
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
# File 'lib/webdrivers/mswebdriver.rb', line 4
def windows_version
Webdrivers.logger.debug 'Checking current version'
version = `powershell (Get-AppxPackage -Name Microsoft.MicrosoftEdge).Version`
raise 'Failed to check Microsoft Edge version.' if version.empty?
Webdrivers.logger.debug "Current version of Microsoft Edge is #{version.chomp!}"
build = version.split('.')[1] Webdrivers.logger.debug "Expecting MicrosoftWebDriver.exe version #{build}"
build.to_i
end
|