### Home Classes Methods

### In Files

- common/src/rb/lib/selenium/webdriver/child_process.rb

### Methods

- #assert_started
- #exit_value
- #kill
- #kill!
- #start
- #wait

### Class/Module Index

Quicksearch

- Selenium
- Selenium::WebDriver
- Selenium::WebDriver::BridgeHelper
- Selenium::WebDriver::ChildProcess
- Selenium::WebDriver::ChildProcess::IronRubyProcess
- Selenium::WebDriver::ChildProcess::JRubyProcess
- Selenium::WebDriver::ChildProcess::WindowsProcess
- Selenium::WebDriver::Chrome
- Selenium::WebDriver::Chrome::Bridge
- Selenium::WebDriver::Chrome::CommandExecutor
- Selenium::WebDriver::Chrome::Launcher
- Selenium::WebDriver::Chrome::Launcher::MacOSXLauncher
- Selenium::WebDriver::Chrome::Launcher::UnixLauncher
- Selenium::WebDriver::Chrome::Launcher::WindowsLauncher
- Selenium::WebDriver::Driver
- Selenium::WebDriver::DriverExtensions
- Selenium::WebDriver::DriverExtensions::TakesScreenshot
- Selenium::WebDriver::Element
- Selenium::WebDriver::Error
- Selenium::WebDriver::Error::ElementNotDisplayedError
- Selenium::WebDriver::Error::ElementNotEnabledError
- Selenium::WebDriver::Error::ElementNotSelectableError
- Selenium::WebDriver::Error::ExpectedError
- Selenium::WebDriver::Error::IndexOutOfBoundsError
- Selenium::WebDriver::Error::InvalidCookieDomainError
- Selenium::WebDriver::Error::NoCollectionError
- Selenium::WebDriver::Error::NoScriptResultError
- Selenium::WebDriver::Error::NoStringError
- Selenium::WebDriver::Error::NoStringLengthError
- Selenium::WebDriver::Error::NoStringWrapperError
- Selenium::WebDriver::Error::NoSuchCollectionError
- Selenium::WebDriver::Error::NoSuchDocumentError
- Selenium::WebDriver::Error::NoSuchDriverError
- Selenium::WebDriver::Error::NoSuchElementError
- Selenium::WebDriver::Error::NoSuchFrameError
- Selenium::WebDriver::Error::NoSuchWindowError
- Selenium::WebDriver::Error::NullPointerError
- Selenium::WebDriver::Error::ObsoleteElementError
- Selenium::WebDriver::Error::ServerError
- Selenium::WebDriver::Error::TimeOutError
- Selenium::WebDriver::Error::UnableToSetCookieError
- Selenium::WebDriver::Error::UnexpectedJavascriptError
- Selenium::WebDriver::Error::UnhandledError
- Selenium::WebDriver::Error::UnknownCommandError
- Selenium::WebDriver::Error::UnknownScriptResultError
- Selenium::WebDriver::Error::UnsupportedOperationError
- Selenium::WebDriver::Error::WebDriverError
- Selenium::WebDriver::FileReaper
- Selenium::WebDriver::Find
- Selenium::WebDriver::Firefox
- Selenium::WebDriver::Firefox::Binary
- Selenium::WebDriver::Firefox::Bridge
- Selenium::WebDriver::Firefox::Launcher
- Selenium::WebDriver::Firefox::Profile
- Selenium::WebDriver::Firefox::ProfilesIni
- Selenium::WebDriver::Firefox::Util
- Selenium::WebDriver::IE
- Selenium::WebDriver::IE::Bridge
- Selenium::WebDriver::IE::Kernel32
- Selenium::WebDriver::IE::Lib
- Selenium::WebDriver::IE::Util
- Selenium::WebDriver::Keys
- Selenium::WebDriver::Navigation
- Selenium::WebDriver::Options
- Selenium::WebDriver::Platform
- Selenium::WebDriver::Remote
- Selenium::WebDriver::Remote::Bridge
- Selenium::WebDriver::Remote::Capabilities
- Selenium::WebDriver::Remote::Http
- Selenium::WebDriver::Remote::Http::Common
- Selenium::WebDriver::Remote::Http::Curb
- Selenium::WebDriver::Remote::Http::Default
- Selenium::WebDriver::Remote::Response
- Selenium::WebDriver::TargetLocator
- Selenium::WebDriver::Timeouts
- Dir
- SocketError
- String

No matching classes.

# Selenium::WebDriver::ChildProcess::JRubyProcess

### Public Instance Methods

assert_started() click to toggle source

    # File common/src/rb/lib/selenium/webdriver/child_process.rb, line 195
    def assert_started
      raise Error::WebDriverError, "process not started" unless @process
    end

exit_value() click to toggle source

    # File common/src/rb/lib/selenium/webdriver/child_process.rb, line 188
    def exit_value
      assert_started
      @process.exitValue
    rescue java.lang.IllegalThreadStateException
      nil
    end

kill() click to toggle source

    # File common/src/rb/lib/selenium/webdriver/child_process.rb, line 176
    def kill
      assert_started
      @process.destroy
    end

Also aliased as: kill!
kill!() click to toggle source
Alias for: kill
start() click to toggle source

    # File common/src/rb/lib/selenium/webdriver/child_process.rb, line 146
    def start
      require 'java'
      pb = java.lang.ProcessBuilder.new(@args)

      env = pb.environment
      ENV.each { |k,v| env.put(k, v) }

      @process = pb.start

      # Firefox 3.6 on Snow Leopard has a lot output on stderr, which makes
      # the launch act funny if we don't do something to the streams

      @process.getErrorStream.close
      @process.getInputStream.close

      # Closing the streams solves that problem, but on other platforms we might
      # need to actually read them.

      # Thread.new do
      #   input, error = 0, 0
      #   loop do
      #     error = @process.getErrorStream.read if error != -1
      #     input = @process.getInputStream.read if input != -1
      #     break if error == -1 && input == -1
      #   end
      # end

      self
    end

wait() click to toggle source

    # File common/src/rb/lib/selenium/webdriver/child_process.rb, line 182
    def wait
      assert_started
      @process.waitFor
      [nil, @process.exitValue] # no robust way to get pid here
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.