Sha256: 820338c5bb590314e3231a5ad80bf7827cb5ae9b62e4b5f4c665126e557cd40c

Contents?: true

Size: 671 Bytes

Versions: 12

Compression:

Stored size: 671 Bytes

Contents

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

describe "Lis" do

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

  describe "#length" do
    it "returns the number of lis" do
      browser.lis.length.should == 18
    end
  end

  describe "#[]" do
    it "returns the li at the given index" do
      browser.lis[4].id.should == "non_link_1"
    end
  end

  describe "#each" do
    it "iterates through lis correctly" do
      browser.lis.each_with_index do |l, index|
        l.id.should == browser.li(:index, index).id
        l.value.should == browser.li(: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/lis_spec.rb
watir-webdriver-0.0.5 spec/watirspec/lis_spec.rb
watir-webdriver-0.0.4 spec/watirspec/lis_spec.rb
watir-webdriver-0.0.3 spec/watirspec/lis_spec.rb
watir-webdriver-0.0.2 spec/watirspec/lis_spec.rb
watir-webdriver-0.0.1 spec/watirspec/lis_spec.rb
watir-webdriver-0.0.1.dev7 spec/watirspec/lis_spec.rb
watir-webdriver-0.0.1.dev5 spec/watirspec/lis_spec.rb
watir-webdriver-0.0.1.dev4 spec/watirspec/lis_spec.rb
watir-webdriver-0.0.1.dev3 spec/watirspec/lis_spec.rb
watir-webdriver-0.0.1.dev2 spec/watirspec/lis_spec.rb
watir-webdriver-0.0.1.dev spec/watirspec/lis_spec.rb