Sha256: 4f6c5d9f932fd2043355d6486220904e288943761f0d865b316b2aa8329cea42

Contents?: true

Size: 1.48 KB

Versions: 12

Compression:

Stored size: 1.48 KB

Contents

# encoding: utf-8
require File.dirname(__FILE__) + '/spec_helper'

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[0].id.should == "frame_1"
      end
    end

    describe "#each" do
      it "iterates through frames correctly" do
        browser.frames.each_with_index do |f, index|
          f.id.should ==  browser.frame(:index, index).id
          f.value.should == browser.frame(:index, index).value
        end
      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[0].id.should == "frame_1"
      end
    end

    describe "#each" do
      it "iterates through frames correctly" do
        browser.frames.each_with_index do |f, index|
          f.name.should == browser.frame(:index, index).name
          f.id.should ==  browser.frame(:index, index).id
          f.value.should == browser.frame(:index, index).value
        end
      end
    end
  end

end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
watir-webdriver-0.0.6 spec/watirspec/frames_spec.rb
watir-webdriver-0.0.5 spec/watirspec/frames_spec.rb
watir-webdriver-0.0.4 spec/watirspec/frames_spec.rb
watir-webdriver-0.0.3 spec/watirspec/frames_spec.rb
watir-webdriver-0.0.2 spec/watirspec/frames_spec.rb
watir-webdriver-0.0.1 spec/watirspec/frames_spec.rb
watir-webdriver-0.0.1.dev7 spec/watirspec/frames_spec.rb
watir-webdriver-0.0.1.dev5 spec/watirspec/frames_spec.rb
watir-webdriver-0.0.1.dev4 spec/watirspec/frames_spec.rb
watir-webdriver-0.0.1.dev3 spec/watirspec/frames_spec.rb
watir-webdriver-0.0.1.dev2 spec/watirspec/frames_spec.rb
watir-webdriver-0.0.1.dev spec/watirspec/frames_spec.rb