Sha256: 01f06643ecaf82ae34dde269a8fac11284664af8abc438dba60e5f0b0cae151c

Contents?: true

Size: 1.68 KB

Versions: 25

Compression:

Stored size: 1.68 KB

Contents

# encoding: utf-8
require File.expand_path("../spec_helper", __FILE__)

not_compliant_on :watir do
  describe "<frame> Frames" do

    before :each do
      browser.goto(WatirSpec.files + "/frames.html")
    end

    describe "#length" do
      it "returns the correct number of frames" do
        browser.frames.length.should == 2
      end
    end

    describe "#[]" do
      it "returns the frame at the given index" do
        browser.frames[1].id.should == "frame_1"
      end
    end

    describe "#each" do
      it "iterates through frames correctly" do
        count = 0

        browser.frames.each_with_index do |f, index|
          f.name.should == browser.frame(:index, index+1).name
          f.id.should ==  browser.frame(:index, index+1).id
          f.value.should == browser.frame(:index, index+1).value

          count += 1
        end

        count.should > 0
      end
    end
  end

  describe "<iframe> Frames" do

    before :each do
      browser.goto(WatirSpec.files + "/iframes.html")
    end

    describe "#length" do
      it "returns the correct number of frames" do
        browser.frames.length.should == 2
      end
    end

    describe "#[]" do
      it "returns the frame at the given index" do
        browser.frames[1].id.should == "frame_1"
      end
    end

    describe "#each" do
      it "iterates through frames correctly" do
        count = 0

        browser.frames.each_with_index do |f, index|
          f.name.should == browser.frame(:index, index+1).name
          f.id.should ==  browser.frame(:index, index+1).id
          f.value.should == browser.frame(:index, index+1).value

          count += 1
        end

        count.should > 0
      end
    end
  end

end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
operawatir-0.7.pre4-jruby spec/watir2/frames_spec.rb
operawatir-0.7.pre3-jruby spec/watir2/frames_spec.rb
operawatir-0.7.pre2-jruby spec/watir2/frames_spec.rb
operawatir-0.7.pre1-jruby spec/watir2/frames_spec.rb
operawatir-0.6.pre1-jruby spec/watir2/frames_spec.rb
operawatir-0.5.1-jruby spec/watir2/frames_spec.rb
operawatir-0.5-jruby spec/watir2/frames_spec.rb
operawatir-0.5.pre3-jruby spec/watir2/frames_spec.rb
operawatir-0.5.pre2-jruby spec/watir2/frames_spec.rb
operawatir-0.5.pre1-jruby spec/watir2/frames_spec.rb
operawatir-0.4.3.pre1-jruby spec/watir2/frames_spec.rb
operawatir-0.4.2-jruby spec/watir2/frames_spec.rb
operawatir-0.4.1-jruby spec/watir2/frames_spec.rb
operawatir-0.4.1.pre7-jruby spec/watir2/frames_spec.rb
operawatir-0.4.1.pre6-jruby spec/watir2/frames_spec.rb
operawatir-0.4.1.pre5-jruby spec/watir2/frames_spec.rb
operawatir-0.4.1.pre4-jruby spec/watir2/frames_spec.rb
operawatir-0.4.1.pre3-jruby spec/watir2/frames_spec.rb
operawatir-0.4.1.pre2-jruby spec/watir2/frames_spec.rb
operawatir-0.4.1.pre1-jruby spec/watir2/frames_spec.rb