Sha256: f6b39aba8b3877fb4599a5ab4cce0226a3270547f975dc2053ecb82ed1e76b2d

Contents?: true

Size: 678 Bytes

Versions: 7

Compression:

Stored size: 678 Bytes

Contents

require 'spec_helper'

describe "Proxy + WebDriverListener" do
  let(:proxy) { new_proxy }
  let(:listener) { BrowserMob::Proxy::WebDriverListener.new(proxy) }

  let(:driver)  { Selenium::WebDriver.for :firefox, :profile => profile, :listener => listener }
  let(:wait) { Selenium::WebDriver::Wait.new }

  let(:profile) {
    pr = Selenium::WebDriver::Firefox::Profile.new
    pr.proxy = proxy.selenium_proxy

    pr
  }

  after { proxy.close }

  it "should record events" do
    driver.get url_for("1.html")
    driver.find_element(:link_text => "2").click
    driver.quit

    hars = listener.hars
    hars.size.should == 1

    hars.first.pages.size.should == 2
  end
end

Version data entries

7 entries across 7 versions & 2 rubygems

Version Path
browsermob-proxy2-0.1.0 spec/e2e/listener_spec.rb
browsermob-proxy-0.0.9 spec/e2e/listener_spec.rb
browsermob-proxy-0.0.8 spec/e2e/listener_spec.rb
browsermob-proxy-0.0.7 spec/e2e/listener_spec.rb
browsermob-proxy-0.0.6 spec/e2e/listener_spec.rb
browsermob-proxy-0.0.5 spec/e2e/listener_spec.rb
browsermob-proxy-0.0.4 spec/e2e/listener_spec.rb