Sha256: fb96acd80d3aaeff39bacf6415fca90c44974682d2c2518407d4bea8dcb848af

Contents?: true

Size: 646 Bytes

Versions: 5

Compression:

Stored size: 646 Bytes

Contents

# frozen_string_literal: true

Capybara::SpecHelper.spec '#frame_title', requires: [:frames] do
  before(:each) do
    @session.visit('/within_frames')
  end

  it "should return the title in a frame" do
    @session.within_frame("frameOne") do
      expect(@session.driver.frame_title).to eq 'This is the title of frame one'
    end
  end

  it "should return the title in FrameTwo" do
    @session.within_frame("frameTwo") do
      expect(@session.driver.frame_title).to eq 'This is the title of frame two'
    end
  end

  it "should return the title in the main frame" do
    expect(@session.driver.frame_title).to eq 'With Frames'
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
capybara-3.0.3 lib/capybara/spec/session/frame/frame_title_spec.rb
capybara-3.0.2 lib/capybara/spec/session/frame/frame_title_spec.rb
capybara-3.0.1 lib/capybara/spec/session/frame/frame_title_spec.rb
capybara-3.0.0 lib/capybara/spec/session/frame/frame_title_spec.rb
capybara-3.0.0.rc2 lib/capybara/spec/session/frame/frame_title_spec.rb