Sha256: b0894fa887d8b2fe43dbeb678a601693fa41496f2537f28bf5c3e286ba74132f
Contents?: true
Size: 1.08 KB
Versions: 3
Compression:
Stored size: 1.08 KB
Contents
# encoding: utf-8 require File.expand_path("../spec_helper", __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
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
watir-webdriver-0.1.4 | spec/watirspec/tables_spec.rb |
watir-webdriver-0.1.3 | spec/watirspec/tables_spec.rb |
watir-webdriver-0.1.2 | spec/watirspec/tables_spec.rb |