Sha256: a523ddf32a69fe272bcc3763207fb6e598081fe6e8b49f7ddd279d4bd18e6f41

Contents?: true

Size: 681 Bytes

Versions: 12

Compression:

Stored size: 681 Bytes

Contents

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

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
      browser.ols.each_with_index do |ol, index|
        ol.id.should == browser.ol(:index, index).id
        ol.value.should == browser.ol(:index, index).value
      end
    end
  end

end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
watir-webdriver-0.0.6 spec/watirspec/ols_spec.rb
watir-webdriver-0.0.5 spec/watirspec/ols_spec.rb
watir-webdriver-0.0.4 spec/watirspec/ols_spec.rb
watir-webdriver-0.0.3 spec/watirspec/ols_spec.rb
watir-webdriver-0.0.2 spec/watirspec/ols_spec.rb
watir-webdriver-0.0.1 spec/watirspec/ols_spec.rb
watir-webdriver-0.0.1.dev7 spec/watirspec/ols_spec.rb
watir-webdriver-0.0.1.dev5 spec/watirspec/ols_spec.rb
watir-webdriver-0.0.1.dev4 spec/watirspec/ols_spec.rb
watir-webdriver-0.0.1.dev3 spec/watirspec/ols_spec.rb
watir-webdriver-0.0.1.dev2 spec/watirspec/ols_spec.rb
watir-webdriver-0.0.1.dev spec/watirspec/ols_spec.rb