Sha256: b12a19d75aa5bca9fae64282a12072ed585f3ba3920fbad3623a507289a493b8

Contents?: true

Size: 670 Bytes

Versions: 12

Compression:

Stored size: 670 Bytes

Contents

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

describe "Metas" do

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

  describe "#length" do
    it "returns the number of meta elements" do
      browser.metas.length.should == 2
    end
  end

  describe "#[]" do
    it "returns the meta element at the given index" do
      browser.metas[1].name.should == "description"
    end
  end

  describe "#each" do
    it "iterates through meta elements correctly" do
      browser.metas.each_with_index do |m, index|
        m.content.should == browser.meta(:index, index).content
      end
    end
  end

end

Version data entries

12 entries across 12 versions & 1 rubygems

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