Sha256: 7f6a01f193422cda87b5d9db0099e773688633a7ed9de527d5c3d305e4dafca0
Contents?: true
Size: 1018 Bytes
Versions: 2
Compression:
Stored size: 1018 Bytes
Contents
# encoding: utf-8 require File.expand_path('spec_helper', File.dirname(__FILE__)) describe "Inses" 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.inses(:class => "lead").to_a.should == [browser.ins(:class => "lead")] end end end describe "#length" do it "returns the number of inses" do browser.inses.length.should == 5 end end describe "#[]" do it "returns the ins at the given index" do browser.inses[0].id.should == "lead" end end describe "#each" do it "iterates through inses correctly" do count = 0 browser.inses.each_with_index do |s, index| s.id.should == browser.ins(:index, index).id s.value.should == browser.ins(: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/inses_spec.rb |
watir-webdriver-0.1.0 | spec/watirspec/inses_spec.rb |