Method: Capybara::Poltergeist::Browser#network_traffic

Defined in:
lib/capybara/poltergeist/browser.rb

#network_trafficObject



263
264
265
266
267
268
269
270
271
# File 'lib/capybara/poltergeist/browser.rb', line 263

def network_traffic
  command('network_traffic').values.map do |event|
    NetworkTraffic::Request.new(
      event['request'],
      event['responseParts'].map { |response| NetworkTraffic::Response.new(response) },
      event['error'] ? NetworkTraffic::Error.new(event['error']) : nil
    )
  end
end