Sha256: 53bbe1b23206590116634d37018bdf2c8e96f39997d9f176ccf285c0e9ebf6f2
Contents?: true
Size: 1.55 KB
Versions: 3
Compression:
Stored size: 1.55 KB
Contents
# encoding: utf-8 require File.expand_path("../spec_helper", __FILE__) describe "TableBodies" 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.tbodys(:id => "first").to_a.should == [browser.tbody(:id => "first")] end end end describe "#length" do it "returns the correct number of table bodies (page context)" do browser.tbodys.length.should == 5 end it "returns the correct number of table bodies (table context)" do browser.table(:index, 0).tbodys.length.should == 2 end end describe "#[]" do it "returns the row at the given index (page context)" do browser.tbodys[0].id.should == "first" end it "returns the row at the given index (table context)" do browser.table(:index, 0).tbodys[0].id.should == "first" end end describe "#each" do it "iterates through table bodies correctly (table context)" do count = 0 browser.tbodys.each_with_index do |body, index| body.id.should == browser.tbody(:index, index).id count += 1 end count.should > 0 end it "iterates through table bodies correctly (table context)" do table = browser.table(:index, 0) count = 0 table.tbodys.each_with_index do |body, index| body.id.should == table.tbody(:index, index).id 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/tbodys_spec.rb |
watir-webdriver-0.1.3 | spec/watirspec/tbodys_spec.rb |
watir-webdriver-0.1.2 | spec/watirspec/tbodys_spec.rb |