<commit_before># encoding: utf-8
require File.expand_path('spec_helper', File.dirname(__FILE__))

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<commit_msg>Add some guards for http://github.com/jarib/watir-webdriver/issues#issue/17<commit_after># encoding: utf-8
require File.expand_path('spec_helper', File.dirname(__FILE__))

describe "<frame> Frames" do

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

  bug "http://github.com/jarib/watir-webdriver/issues#issue/17", :webdriver do
    describe "#length" do
      it "returns the correct number of frames" do
        browser.frames.length.should == 2
      end
    end
  end

  bug "http://github.com/jarib/watir-webdriver/issues#issue/17", :webdriver do
    describe "#[]" do
      it "returns the frame at the given index" do
        browser.frames[0].id.should == "frame_1"
      end
    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

  bug "http://github.com/jarib/watir-webdriver/issues#issue/17", :webdriver do
    describe "#length" do
      it "returns the correct number of frames" do
        browser.frames.length.should == 2
      end
    end
  end

  bug "http://github.com/jarib/watir-webdriver/issues#issue/17", :webdriver do
    describe "#[]" do
      it "returns the frame at the given index" do
        browser.frames[0].id.should == "frame_1"
      end
    end
  end

  describe "#each" do
{'fraction_non_alphanumeric': 0.11934766493699037, 'fraction_numerical': 0.008895478131949592, 'mean_word_length': 2.79606188466948, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6667472', 'n_tokens_mistral': 896, 'n_tokens_neox': 857, 'n_words': 247}