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.



18
19
20
# File 'lib/webdrivers/chrome_finder.rb', line 18

def location
  user_defined_location || send("#{System.platform}_location")
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
16
# File 'lib/webdrivers/chrome_finder.rb', line 9

def version
  version = send("#{System.platform}_version", location)

  raise VersionError, 'Failed to find Chrome binary or its 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