Module: Selenium::WebDriver::LocalDriver
- Included in:
- Chrome::Driver, Edge::Driver, Firefox::Driver, IE::Driver, Safari::Driver
- Defined in:
- rb/lib/selenium/webdriver/common/local_driver.rb
Instance Method Summary collapse
- #initialize_local_driver(options, service, url) ⇒ Object
- #process_options(options, service) ⇒ Object
Instance Method Details
#initialize_local_driver(options, service, url) ⇒ Object
23 24 25 26 27 28 29 30 31 |
# File 'rb/lib/selenium/webdriver/common/local_driver.rb', line 23 def initialize_local_driver(, service, url) raise ArgumentError, "Can't initialize #{self.class} with :url" if url service ||= Service.send(browser) caps = (, service) url = service_url(service) [caps, url] end |
#process_options(options, service) ⇒ Object
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
# File 'rb/lib/selenium/webdriver/common/local_driver.rb', line 33 def (, service) = Options.send(browser) ||= unless .is_a?(.class) raise ArgumentError, ":options must be an instance of #{.class}" end service.executable_path ||= begin finder = WebDriver::DriverFinder.new(, service) if .respond_to?(:binary) && finder.browser_path? .binary = finder.browser_path .browser_version = nil end finder.driver_path end .as_json end |