Sha256: 122edd9941a581c8279e95ab09a443e84b0e8ae1872cf6c601ccb94d9869fe49

Contents?: true

Size: 756 Bytes

Versions: 2

Compression:

Stored size: 756 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

2 entries across 2 versions & 1 rubygems

Version Path
watir-webdriver-0.0.9 spec/watirspec/inses_spec.rb
watir-webdriver-0.0.8 spec/watirspec/inses_spec.rb