Class: Capybara::Driver::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/kimurai/capybara_ext/driver/base.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#requestsObject



7
8
9
# File 'lib/kimurai/capybara_ext/driver/base.rb', line 7

def requests
  @requests ||= 0
end

#responsesObject



11
12
13
# File 'lib/kimurai/capybara_ext/driver/base.rb', line 11

def responses
  @responses ||= 0
end

#visitedObject

Returns the value of attribute visited.



4
5
6
# File 'lib/kimurai/capybara_ext/driver/base.rb', line 4

def visited
  @visited
end

Instance Method Details

#current_memoryObject



15
16
17
18
19
20
# File 'lib/kimurai/capybara_ext/driver/base.rb', line 15

def current_memory
  driver_pid = pid

  all = (get_descendant_processes(driver_pid) << driver_pid).uniq
  all.map { |pid| get_process_memory(pid) }.sum
end