Class: Selenium::WebDriver::SeleniumManager Private
- Inherits:
-
Object
- Object
- Selenium::WebDriver::SeleniumManager
- Defined in:
- 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.
Constant Summary collapse
- BIN_PATH =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
'../../../../../bin'
Class Method Summary collapse
-
.driver_path(options) ⇒ String
private
The path to the correct driver.
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.
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 |
# File 'lib/selenium/webdriver/common/selenium_manager.rb', line 35 def driver_path() = 'applicable driver not found; attempting to install with Selenium Manager' WebDriver.logger.warn() unless .is_a?(Options) raise ArgumentError, "SeleniumManager requires a WebDriver::Options instance, not #{.inspect}" end command = [binary, '--browser', "'#{.browser_name}'", '--output', 'json'] if .browser_version command << '--browser-version' command << .browser_version end if .respond_to?(:binary) && !.binary.nil? command << '--browser-path' command << "\"#{.binary.gsub('\ ', ' ').gsub(' ', '\ ')}\"" end command << '--debug' if WebDriver.logger.debug? location = run(command.join(' ')) WebDriver.logger.debug("Driver found at #{location}") Platform.assert_executable location location end |