Class: Capybara::Apparition::Driver

Inherits:
Object
  • Object
show all
Defined in:
lib/tanakai/capybara_ext/apparition/driver.rb

Instance Method Summary collapse

Instance Method Details

#pidObject



5
6
7
# File 'lib/tanakai/capybara_ext/apparition/driver.rb', line 5

def pid
  @pid ||= `lsof -i tcp:#{port} -t`.strip.to_i
end

#portObject



9
10
11
# File 'lib/tanakai/capybara_ext/apparition/driver.rb', line 9

def port
  @port ||= browser.client.instance_variable_get("@ws").instance_variable_get("@driver").instance_variable_get("@socket").instance_variable_get("@io").remote_address.inspect_sockaddr.split(':').last
end