Sha256: 63be16a877b58af4d966809af7110168244ddc79b2bb939113968c21a42d9839
Contents?: true
Size: 1.03 KB
Versions: 3
Compression:
Stored size: 1.03 KB
Contents
# encoding: utf-8 require File.expand_path("../spec_helper", __FILE__) describe "Strongs" 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.strongs(:class => "descartes").to_a.should == [browser.strong(:class => "descartes")] end end end describe "#length" do it "returns the number of divs" do browser.strongs.length.should == 2 end end describe "#[]" do it "returns the div at the given index" do browser.strongs[0].id.should == "descartes" end end describe "#each" do it "iterates through divs correctly" do count = 0 browser.strongs.each_with_index do |s, index| strong = browser.strong(:index, index) s.id.should == strong.id s.class_name.should == strong.class_name 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/strongs_spec.rb |
watir-webdriver-0.1.3 | spec/watirspec/strongs_spec.rb |
watir-webdriver-0.1.2 | spec/watirspec/strongs_spec.rb |