Class: Selenium::WebDriver::SeleniumManager Private

Inherits:
Object
  • Object
show all
Defined in:
rb/lib/selenium/webdriver/common/selenium_manager.rb

Overview

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.

Wrapper for getting information from the Selenium Manager binaries. This implementation is still in beta, and may change.

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.bin_pathObject

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.



33
34
35
# File 'rb/lib/selenium/webdriver/common/selenium_manager.rb', line 33

def bin_path
  @bin_path ||= '../../../../../bin'
end

Class Method Details

.driver_path(options) ⇒ String

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.

Returns the path to the correct driver.

Parameters:

  • options (Options)

    browser options.

Returns:

  • (String)

    the path to the correct driver.



39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# File 'rb/lib/selenium/webdriver/common/selenium_manager.rb', line 39

def driver_path(options)
  command = generate_command(binary, options)

  output = run(*command)

  browser_path = Platform.cygwin? ? Platform.cygwin_path(output['browser_path']) : output['browser_path']
  driver_path = Platform.cygwin? ? Platform.cygwin_path(output['driver_path']) : output['driver_path']
  Platform.assert_executable driver_path

  if options.respond_to?(:binary) && browser_path && !browser_path.empty?
    options.binary = browser_path
    options.browser_version = nil
  end

  driver_path
end