Sha256: 216c1ffb21e2324fe77d656f7a9cb96e44e59c2a908cbd1b78dc25c5f84f3460

Contents?: true

Size: 785 Bytes

Versions: 12

Compression:

Stored size: 785 Bytes

Contents

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

describe "Hiddens" do

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

  describe "#length" do
    it "returns the number of hiddens" do
      browser.hiddens.length.should == 1
    end
  end

  describe "#[]" do
    it "returns the Hidden at the given index" do
      browser.hiddens[0].id.should == "new_user_interests_dolls"
    end
  end

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