Method: Selenium::WebDriver::Chrome::Service#initialize
- Defined in:
- lib/selenium/webdriver/chrome/service.rb
#initialize(executable_path, port) ⇒ Service
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 Service.
31 32 33 34 35 36 37 38 39 |
# File 'lib/selenium/webdriver/chrome/service.rb', line 31 def initialize(executable_path, port) @uri = URI.parse "http://#{Platform.localhost}:#{port}" server_command = [executable_path, "--port=#{port}"] @process = ChildProcess.build(*server_command) @socket_poller = SocketPoller.new Platform.localhost, port, START_TIMEOUT @process.io.inherit! if $DEBUG == true end |