Sha256: 191a6a14abb4a33ecd979d26719ce30b367cbcbf40a3d9d9dd92199cc9e8a7fd
Contents?: true
Size: 1007 Bytes
Versions: 2
Compression:
Stored size: 1007 Bytes
Contents
# encoding: utf-8 require File.expand_path('spec_helper', File.dirname(__FILE__)) describe "Areas" 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.areas(:alt => "Tables").to_a.should == [browser.area(:alt => "Tables")] end end end describe "#length" do it "returns the number of areas" do browser.areas.length.should == 3 end end describe "#[]" do it "returns the area at the given index" do browser.areas[0].id.should == "NCE" end end describe "#each" do it "iterates through areas correctly" do count = 0 browser.areas.each_with_index do |a, index| a.id.should == browser.area(:index, index).id a.title.should == browser.area(:index, index).title 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/areas_spec.rb |
watir-webdriver-0.1.0 | spec/watirspec/areas_spec.rb |