Sha256: 4e16649787479edd13cd06ae37fe6281e40ff75c62f05ff9b4f787c367f95d17
Contents?: true
Size: 1.04 KB
Versions: 3
Compression:
Stored size: 1.04 KB
Contents
# encoding: utf-8 require File.expand_path("../spec_helper", __FILE__) describe "Maps" do before :each do browser.goto(WatirSpec.files + "/images.html") end bug "http://github.com/jarib/celerity/issues#issue/25", :celerity do describe "with selectors" do it "returns the matching elements" do browser.maps(:name => "triangle_map").to_a.should == [browser.map(:name => "triangle_map")] end end end describe "#length" do it "returns the number of maps" do browser.maps.length.should == 2 end end describe "#[]" do it "returns the p at the given index" do browser.maps[0].id.should == "triangle_map" end end describe "#each" do it "iterates through maps correctly" do count = 0 browser.maps.each_with_index do |m, index| m.name.should == browser.map(:index, index).name m.id.should == browser.map(:index, index).id m.value.should == browser.map(: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/maps_spec.rb |
watir-webdriver-0.1.3 | spec/watirspec/maps_spec.rb |
watir-webdriver-0.1.2 | spec/watirspec/maps_spec.rb |