Class: Webdrivers::EdgeFinder Private

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

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Class Method Summary collapse

Class Method Details

.locationObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Raises:


17
18
19
20
21
22
# File 'lib/webdrivers/edge_finder.rb', line 17

def location
  edge_bin = user_defined_location || send("#{System.platform}_location")
  return edge_bin unless edge_bin.nil?

  raise BrowserNotFound, 'Failed to find Edge binary.'
end

.versionObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Raises:


9
10
11
12
13
14
15
# File 'lib/webdrivers/edge_finder.rb', line 9

def version
  version = send("#{System.platform}_version", location)
  raise VersionError, 'Failed to find Edge version.' if version.nil? || version.empty?

  Webdrivers.logger.debug "Browser version: #{version}"
  version[/\d+\.\d+\.\d+\.\d+/] # Microsoft Edge 73.0.3683.75 -> 73.0.3683.75
end