Sha256: 0676324bde2b4569f6e7ca271dbbb356eb511aceba2bb96d463d5831d86d29cd

Contents?: true

Size: 758 Bytes

Versions: 3

Compression:

Stored size: 758 Bytes

Contents

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

describe "Ols" do

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

  describe "#length" do
    it "returns the number of ols" do
      browser.ols.length.should == 2
    end
  end

  describe "#[]" do
    it "returns the ol at the given index" do
      browser.ols[0].id.should == "favorite_compounds"
    end
  end

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

      browser.ols.each_with_index do |ul, index|
        ul.id.should == browser.ol(:index, index).id
        ul.value.should == browser.ol(: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.0.9 spec/watirspec/ols_spec.rb
watir-webdriver-0.0.8 spec/watirspec/ols_spec.rb
watir-webdriver-0.0.7 spec/watirspec/ols_spec.rb