Class: Webdrivers::ChromeFinder Private

Inherits:
Object
  • Object
show all
Defined in:
lib/webdrivers/chrome_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/chrome_finder.rb', line 17

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

  raise BrowserNotFound, 'Failed to find Chrome 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/chrome_finder.rb', line 9

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

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