Sha256: 4056d6c609177a6c0d3da892cb5ea4081f781fee46db4784cf4965b37afc7cdf

Contents?: true

Size: 808 Bytes

Versions: 1

Compression:

Stored size: 808 Bytes

Contents

# encoding: utf-8
require File.expand_path('spec_helper', File.dirname(__FILE__))

describe "Dls" do

  before :each do
    browser.goto(WatirSpec.files + "/definition_lists.html")
  end

  describe "#length" do
    it "returns the number of dls" do
      browser.dls.length.should == 3
    end
  end

  describe "#[]" do
    it "returns the dl at the given index" do
      browser.dls[0].id.should == "experience-list"
    end
  end

  describe "#each" do
    it "iterates through dls correctly" do
      count = 0

      browser.dls.each_with_index do |d, index|
        d.text.should == browser.dl(:index, index).text
        d.id.should == browser.dl(:index, index).id
        d.class_name.should == browser.dl(:index, index).class_name

		count += 1
      end

      count.should > 0
    end
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
watir-webdriver-0.0.7 spec/watirspec/dls_spec.rb