Sha256: 4cf0c166f8877793ec43a7e97870f77a01ea9ade59418951429033776cc3bad9

Contents?: true

Size: 811 Bytes

Versions: 12

Compression:

Stored size: 811 Bytes

Contents

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

describe "CheckBoxes" do

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

  describe "#length" do
    it "returns the number of checkboxes" do
      browser.checkboxes.length.should == 7
    end
  end

  describe "#[]" do
    it "returns the checkbox at the given index" do
      browser.checkboxes[0].id.should == "new_user_interests_books"
    end
  end

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