Method: Selenium::WebDriver::Chrome::Service#stop
- Defined in:
- lib/selenium/webdriver/chrome/service.rb
#stop ⇒ Object
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.
73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 |
# File 'lib/selenium/webdriver/chrome/service.rb', line 73 def stop return if @process.nil? || @process.exited? Net::HTTP.start(@host, @port) do |http| http.open_timeout = STOP_TIMEOUT / 2 http.read_timeout = STOP_TIMEOUT / 2 http.head("/shutdown") end @process.poll_for_exit STOP_TIMEOUT rescue ChildProcess::TimeoutError # ok, force quit @process.stop STOP_TIMEOUT end |