Sha256: 54a5a5a9c60116b186c285163bd319ca37a88bedefa6cff1e250ceba329141ae

Contents?: true

Size: 880 Bytes

Versions: 25

Compression:

Stored size: 880 Bytes

Contents

# encoding: utf-8
require File.expand_path("../spec_helper", __FILE__)

bug "WTR-332", :watir do
  describe "Uls" do

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

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

    describe "#[]" do
      it "returns the ul at the given index" do
        browser.uls[1].id.should == "navbar"
      end
    end

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

        browser.uls.each_with_index do |ul, index|
          ul.name.should == browser.ul(:index, index+1).name
          ul.id.should == browser.ul(:index, index+1).id
          ul.value.should == browser.ul(:index, index+1).value

          count += 1
        end

        count.should > 0
      end
    end

  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
operawatir-0.7.pre4-jruby spec/watir2/uls_spec.rb
operawatir-0.7.pre3-jruby spec/watir2/uls_spec.rb
operawatir-0.7.pre2-jruby spec/watir2/uls_spec.rb
operawatir-0.7.pre1-jruby spec/watir2/uls_spec.rb
operawatir-0.6.pre1-jruby spec/watir2/uls_spec.rb
operawatir-0.5.1-jruby spec/watir2/uls_spec.rb
operawatir-0.5-jruby spec/watir2/uls_spec.rb
operawatir-0.5.pre3-jruby spec/watir2/uls_spec.rb
operawatir-0.5.pre2-jruby spec/watir2/uls_spec.rb
operawatir-0.5.pre1-jruby spec/watir2/uls_spec.rb
operawatir-0.4.3.pre1-jruby spec/watir2/uls_spec.rb
operawatir-0.4.2-jruby spec/watir2/uls_spec.rb
operawatir-0.4.1-jruby spec/watir2/uls_spec.rb
operawatir-0.4.1.pre7-jruby spec/watir2/uls_spec.rb
operawatir-0.4.1.pre6-jruby spec/watir2/uls_spec.rb
operawatir-0.4.1.pre5-jruby spec/watir2/uls_spec.rb
operawatir-0.4.1.pre4-jruby spec/watir2/uls_spec.rb
operawatir-0.4.1.pre3-jruby spec/watir2/uls_spec.rb
operawatir-0.4.1.pre2-jruby spec/watir2/uls_spec.rb
operawatir-0.4.1.pre1-jruby spec/watir2/uls_spec.rb