Sha256: 3a7a17f595d4d8c319d7cebe97012b1790daa4caa8b2e9ada685587aec983dc2
Contents?: true
Size: 1016 Bytes
Versions: 3
Compression:
Stored size: 1016 Bytes
Contents
# encoding: utf-8 require File.expand_path("../spec_helper", __FILE__) describe "Ols" do before :each do browser.goto(WatirSpec.files + "/non_control_elements.html") end bug "http://github.com/jarib/celerity/issues#issue/25", :celerity do describe "with selectors" do it "returns the matching elements" do browser.ols(:class => "chemistry").to_a.should == [browser.ol(:class => "chemistry")] end end end describe "#length" do it "returns the number of ols" do browser.ols.length.should == 2 end end describe "#[]" do it "returns the ol at the given index" do browser.ols[0].id.should == "favorite_compounds" end end describe "#each" do it "iterates through ols correctly" do count = 0 browser.ols.each_with_index do |ul, index| ul.id.should == browser.ol(:index, index).id ul.value.should == browser.ol(: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/ols_spec.rb |
watir-webdriver-0.1.3 | spec/watirspec/ols_spec.rb |
watir-webdriver-0.1.2 | spec/watirspec/ols_spec.rb |