Sha256: e6a75b5977df1b86cc640fbdc8a3fd0cc51c46c0a8fd545e6e1624b1beb7e85a
Contents?: true
Size: 897 Bytes
Versions: 1
Compression:
Stored size: 897 Bytes
Contents
# encoding: utf-8 require File.expand_path('spec_helper', File.dirname(__FILE__)) describe "FileFields" do before :each do browser.goto(WatirSpec.files + "/forms_with_input_elements.html") end describe "#length" do it "returns the correct number of file fields" do browser.file_fields.length.should == 2 end end describe "#[]" do it "returns the file field at the given index" do browser.file_fields[0].id.should == "new_user_portrait" end end describe "#each" do it "iterates through file fields correctly" do count = 0 browser.file_fields.each_with_index do |f, index| f.name.should == browser.file_field(:index, index).name f.id.should == browser.file_field(:index, index).id f.value.should == browser.file_field(:index, index).value count += 1 end count.should > 0 end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
watir-webdriver-0.0.7 | spec/watirspec/filefields_spec.rb |