Sha256: 2a3f092f688b0b4fc06944e29a00a7b909883dcd054fef4749d25f04ba9b2abf

Contents?: true

Size: 750 Bytes

Versions: 1

Compression:

Stored size: 750 Bytes

Contents

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

describe "Inses" do

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

  describe "#length" do
    it "returns the number of inses" do
      browser.inses.length.should == 5
    end
  end

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

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

      browser.inses.each_with_index do |s, index|
        s.id.should == browser.ins(:index, index).id
        s.value.should == browser.ins(:index, index).value

		count += 1
      end

      count.should > 0
    end
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
watir-webdriver-0.0.7 spec/watirspec/inses_spec.rb