Class: Selenium::WebDriver::Remote::Driver Private
- Includes:
- DriverExtensions::HasFileDownloads, DriverExtensions::HasSessionId, DriverExtensions::UploadsFiles
- Defined in:
- rb/lib/selenium/webdriver/remote/driver.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.
Driver implementation for remote server.
Constant Summary
Constants included from SearchContext
Instance Method Summary collapse
-
#initialize(capabilities: nil, options: nil, service: nil, url: nil, **opts) ⇒ Driver
constructor
private
A new instance of Driver.
Methods included from DriverExtensions::HasFileDownloads
#delete_downloadable_files, #download_file, #downloadable_files
Methods included from DriverExtensions::HasSessionId
Methods included from DriverExtensions::UploadsFiles
Methods inherited from Driver
#[], #action, #add_virtual_authenticator, #browser, #capabilities, #close, #current_url, #execute_async_script, #execute_script, for, #get, #inspect, #manage, #navigate, #page_source, #quit, #ref, #script, #status, #switch_to, #title, #window_handle, #window_handles
Methods included from TakesScreenshot
#save_screenshot, #screenshot_as
Methods included from SearchContext
#find_element, #find_elements, finders
Constructor Details
#initialize(capabilities: nil, options: nil, service: nil, url: nil, **opts) ⇒ Driver
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 a new instance of Driver.
33 34 35 36 37 38 39 40 41 42 43 |
# File 'rb/lib/selenium/webdriver/remote/driver.rb', line 33 def initialize(capabilities: nil, options: nil, service: nil, url: nil, **opts) raise ArgumentError, "Can not set :service object on #{self.class}" if service url ||= "http://#{Platform.localhost}:4444/wd/hub" caps = (, capabilities) super(caps: caps, url: url, **opts) @bridge.file_detector = ->((filename, *)) { File.exist?(filename) && filename.to_s } command_list = @bridge.command_list @bridge.extend(WebDriver::Remote::Features) @bridge.add_commands(command_list) end |