Sha256: 94649b2f71aed2624d9c75e1aec08cc66dba438bc3db1351e46048470291f5a5
Contents?: true
Size: 845 Bytes
Versions: 12
Compression:
Stored size: 845 Bytes
Contents
# encoding: utf-8 require File.dirname(__FILE__) + '/spec_helper' describe "Forms" do before :each do browser.goto(WatirSpec.files + "/forms_with_input_elements.html") end describe "#length" do it "returns the number of forms in the container" do browser.forms.length.should == 2 end end describe "#[]n" do it "provides access to the nth form" do browser.forms[0].action.should == 'post_to_me' browser.forms[0].attribute_value('method').should == 'post' end end describe "#each" do it "iterates through forms correctly" do browser.forms.each_with_index do |f, index| f.name.should == browser.form(:index, index).name f.id.should == browser.form(:index, index).id f.class_name.should == browser.form(:index, index).class_name end end end end
Version data entries
12 entries across 12 versions & 1 rubygems