Sha256: d41241cb216a8df1a6f37e39ba6755c7653ecfffd59a0ec6353e5bdef0b0e36e

Contents?: true

Size: 667 Bytes

Versions: 7

Compression:

Stored size: 667 Bytes

Contents

# encoding: utf-8
require File.dirname(__FILE__) + '/spec_helper'

describe "Areas" do

  before :each do
    browser.goto(WatirSpec.files + "/images.html")
  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
      browser.areas.each_with_index do |a, index|
        a.id.should == browser.area(:index, index).id
        a.title.should == browser.area(:index, index).title
      end
    end
  end

end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
watir-webdriver-0.0.6 spec/watirspec/areas_spec.rb
watir-webdriver-0.0.5 spec/watirspec/areas_spec.rb
watir-webdriver-0.0.4 spec/watirspec/areas_spec.rb
watir-webdriver-0.0.3 spec/watirspec/areas_spec.rb
watir-webdriver-0.0.2 spec/watirspec/areas_spec.rb
watir-webdriver-0.0.1 spec/watirspec/areas_spec.rb
watir-webdriver-0.0.1.dev7 spec/watirspec/areas_spec.rb