Sha256: d8483e447ec464c144d18a0c7ca2844bf6403bba0f242696da004d1f772ab1f9

Contents?: true

Size: 679 Bytes

Versions: 11

Compression:

Stored size: 679 Bytes

Contents

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

describe "Spans" do

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

  describe "#length" do
    it "returns the number of spans" do
      browser.spans.length.should == 6
    end
  end

  describe "#[]" do
    it "returns the p at the given index" do
      browser.spans[0].id.should == "lead"
    end
  end

  describe "#each" do
    it "iterates through spans correctly" do
      browser.spans.each_with_index do |s, index|
        s.id.should == browser.span(:index, index).id
        s.value.should == browser.span(:index, index).value
      end
    end
  end

end

Version data entries

11 entries across 11 versions & 1 rubygems

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