Sha256: 40a5913d19c890b443fa63381bb0a0fc1f0588b0006ed3ab58bea7dca3222632
Contents?: true
Size: 943 Bytes
Versions: 12
Compression:
Stored size: 943 Bytes
Contents
# encoding: utf-8 require File.dirname(__FILE__) + '/spec_helper' describe "TextFields" do before :each do browser.goto(WatirSpec.files + "/forms_with_input_elements.html") end describe "#length" do it "returns the number of text fields" do browser.text_fields.length.should == 9 end end describe "#[]" do it "returns the text field at the given index" do browser.text_fields[0].id.should == "new_user_first_name" browser.text_fields[1].id.should == "new_user_last_name" browser.text_fields[2].id.should == "new_user_email" end end describe "#each" do it "iterates through text fields correctly" do browser.text_fields.each_with_index do |r, index| r.name.should == browser.text_field(:index, index).name r.id.should == browser.text_field(:index, index).id r.value.should == browser.text_field(:index, index).value end end end end
Version data entries
12 entries across 12 versions & 1 rubygems