Sha256: b2447cf05015968cabdc7be5d1e515c3db943024d2578aeb3d1680dd15d6ebe4

Contents?: true

Size: 667 Bytes

Versions: 5

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.value.should == browser.area(:index, index).value
      end
    end
  end

end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
watir-webdriver-0.0.1.dev5 spec/watirspec/areas_spec.rb
watir-webdriver-0.0.1.dev4 spec/watirspec/areas_spec.rb
watir-webdriver-0.0.1.dev3 spec/watirspec/areas_spec.rb
watir-webdriver-0.0.1.dev2 spec/watirspec/areas_spec.rb
watir-webdriver-0.0.1.dev spec/watirspec/areas_spec.rb