Module: Selenium::WebDriver::ChildProcess::IronRubyProcess

Defined in:
lib/selenium/webdriver/child_process.rb

Instance Method Summary collapse

Instance Method Details

#assert_startedObject



236
237
238
# File 'lib/selenium/webdriver/child_process.rb', line 236

def assert_started
  raise Error::WebDriverError, "process not started" unless @process
end

#exit_valueObject



229
230
231
232
233
234
# File 'lib/selenium/webdriver/child_process.rb', line 229

def exit_value
  assert_started
  return unless @process.HasExited

  @process.ExitCode
end

#killObject



213
214
215
216
# File 'lib/selenium/webdriver/child_process.rb', line 213

def kill
  assert_started
  @process.Kill
end

#pidObject



224
225
226
227
# File 'lib/selenium/webdriver/child_process.rb', line 224

def pid
  assert_started
  @process.Id
end

#startObject



201
202
203
204
205
206
207
208
209
210
211
# File 'lib/selenium/webdriver/child_process.rb', line 201

def start
  args = @args.dup

  @process                           = System::Diagnostics::Process.new
  @process.StartInfo.UseShellExecute = true
  @process.StartInfo.FileName        = args.shift
  @process.StartInfo.Arguments       = args.join ' '
  @process.start

  self
end

#waitObject



218
219
220
221
222
# File 'lib/selenium/webdriver/child_process.rb', line 218

def wait
  assert_started
  @process.WaitForExit
  [pid, exit_value]
end