Class: Selenium::WebDriver::Remote::Driver Private
- Inherits:
-
WebDriver::Driver
- Object
- WebDriver::Driver
- Selenium::WebDriver::Remote::Driver
- Includes:
- DriverExtensions::HasFileDownloads, DriverExtensions::HasSessionEvents, 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.
Instance Method Summary collapse
-
#initialize(capabilities: nil, options: nil, service: nil, url: nil) ⇒ Driver
constructor
private
A new instance of Driver.
Methods included from DriverExtensions::HasSessionEvents
Methods included from DriverExtensions::HasFileDownloads
#delete_downloadable_files, #download_file, #downloadable_files
Methods included from DriverExtensions::HasSessionId
Methods included from DriverExtensions::UploadsFiles
Constructor Details
#initialize(capabilities: nil, options: nil, service: nil, url: nil) ⇒ 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.
34 35 36 37 38 39 40 41 42 43 44 |
# File 'rb/lib/selenium/webdriver/remote/driver.rb', line 34 def initialize(capabilities: nil, options: nil, service: nil, url: nil, **) 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, **) @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 |