Sha256: 7249139789ec23a749906d26523f95992a868134f8a070a778aefa5371231f62
Contents?: true
Size: 1.09 KB
Versions: 2
Compression:
Stored size: 1.09 KB
Contents
# encoding: utf-8 require File.expand_path('spec_helper', File.dirname(__FILE__)) describe "Tables" do before :each do browser.goto(WatirSpec.files + "/tables.html") end bug "http://github.com/jarib/celerity/issues#issue/25", :celerity do describe "with selectors" do it "returns the matching elements" do browser.tables(:rules => "groups").to_a.should == [browser.table(:rules => "groups")] end end end describe "#length" do it "returns the number of tables" do browser.tables.length.should == 4 end end describe "#[]" do it "returns the p at the given index" do browser.tables[0].id.should == "axis_example" browser.tables[1].id.should == "outer" browser.tables[2].id.should == "inner" end end describe "#each" do it "iterates through tables correctly" do count = 0 browser.tables.each_with_index do |t, index| t.id.should == browser.table(:index, index).id t.value.should == browser.table(: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.1.1 | spec/watirspec/tables_spec.rb |
watir-webdriver-0.1.0 | spec/watirspec/tables_spec.rb |